home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / emacs-complete / fsf / emacs / configure < prev    next >
Text File  |  1994-10-15  |  100KB  |  3,560 lines

  1. #!/bin/sh
  2. #### Configuration script for GNU Emacs
  3. #### Copyright (C) 1992, 1994 Free Software Foundation, Inc.
  4. #### This script requires autoconf version 1.9 or later.
  5.  
  6. ### Don't edit this script!
  7. ### This script was automatically generated by the `autoconf' program
  8. ### from the file `./configure.in'.
  9. ### To rebuild it, execute the command
  10. ###    autoconf
  11. ### in the this directory.
  12.  
  13. ### This file is part of GNU Emacs.
  14.  
  15. ### GNU Emacs is free software; you can redistribute it and/or modify
  16. ### it under the terms of the GNU General Public License as published by
  17. ### the Free Software Foundation; either version 2, or (at your option)
  18. ### any later version.
  19.  
  20. ### GNU Emacs is distributed in the hope that it will be useful,
  21. ### but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  23. ### GNU General Public License for more details.
  24.  
  25. ### You should have received a copy of the GNU General Public License
  26. ### along with GNU Emacs; see the file COPYING.  If not, write to
  27. ### the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  28.  
  29. ### Since Emacs has configuration requirements that autoconf can't
  30. ### meet, this file is an unholy marriage of custom-baked
  31. ### configuration code and autoconf macros.
  32. ###
  33. ### We use the m4 quoting characters [ ] (as established by the
  34. ### autoconf system) to include large sections of raw sewage - Oops, I
  35. ### mean, shell code - in the final configuration script.
  36. ###
  37. ### Usage: configure config_name
  38. ###
  39. ### If configure succeeds, it leaves its status in config.status.
  40. ### If configure fails after disturbing the status quo,
  41. ###     config.status is removed.
  42.  
  43. ### Remove any more than one leading "." element from the path name.
  44. ### If we don't remove them, then another "./" will be prepended to
  45. ### the file name each time we use config.status, and the program name
  46. ### will get larger and larger.  This wouldn't be a problem, except
  47. ### that since progname gets recorded in all the Makefiles this script
  48. ### produces, move-if-change thinks they're different when they're
  49. ### not.
  50. ###
  51. ### It would be nice if we could put the ./ in a \( \) group and then
  52. ### apply the * operator to that, so we remove as many leading ./././'s
  53. ### as are present, but some seds (like Ultrix's sed) don't allow you to
  54. ### apply * to a \( \) group.  Bleah.
  55. progname="`echo $0 | sed 's:^\./\./:\./:'`"
  56.  
  57.  
  58. ### Establish some default values.
  59. run_in_place=
  60. single_tree=
  61. prefix='/usr/local'
  62. exec_prefix='${prefix}'
  63. bindir='${exec_prefix}/bin'
  64. datadir='${prefix}/lib'
  65. statedir='${prefix}/lib'
  66. libdir='${exec_prefix}/lib'
  67. mandir='${prefix}/man/man1'
  68. infodir='${prefix}/info'
  69. lispdir='${datadir}/emacs/${version}/lisp'
  70. locallisppath='${datadir}/emacs/site-lisp'
  71. lisppath='${locallisppath}:${lispdir}'
  72. etcdir='${datadir}/emacs/${version}/etc'
  73. lockdir='${statedir}/emacs/lock'
  74. archlibdir='${libdir}/emacs/${version}/${configuration}'
  75. docdir='${datadir}/emacs/${version}/etc'
  76.  
  77. # On Sun systems, people sometimes set up the variable CPP
  78. # with a value that is a directory, not an executable at all.
  79. # Detect that case, and ignore that value.
  80. if [ "x$CPP" != x ] && [ -d "$CPP" ];
  81. then
  82.   CPP=
  83. fi
  84.  
  85. # We cannot use this variable in the case statement below, because many
  86. # /bin/sh's have broken semantics for "case".  Unfortunately, you must
  87. # actually edit the clause itself.
  88. # path_options="prefix | exec_prefix | bindir | libdir | etcdir | datadir"
  89. # path_options="$path_options | archlibdir | statedir | mandir | infodir"
  90. # path_options="$path_options | lispdir | lockdir | lisppath | locallisppath"
  91.  
  92. #### Usage messages.
  93.  
  94. short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]
  95.  
  96. Set compilation and installation parameters for GNU Emacs, and report.
  97. CONFIGURATION specifies the machine and operating system to build for.
  98. --with-x        Support the X Window System.
  99. --with-x=no        Don't support X.
  100. --with-x-toolkit    Use an X toolkit.
  101. --with-x-toolkit=no    Don't use an X toolkit.
  102. --with-gcc        Use GCC to compile Emacs.
  103. --with-gcc=no        Don't use GCC to compile Emacs.
  104. --x-includes=DIR     Search for X header files in DIR.
  105. --x-libraries=DIR    Search for X libraries in DIR.
  106. --run-in-place        Use libraries and data files directly out of the 
  107.             source tree.
  108. --single-tree=DIR    Has the effect of creating a directory tree at DIR
  109.             which looks like:
  110.               .../DIR/bin/CONFIGNAME (emacs, etags, etc.)
  111.               .../DIR/bin/CONFIGNAME/etc (movemail, etc.)
  112.               .../DIR/common/lisp  (emacs' lisp files)
  113.               .../DIR/common/site-lisp (local lisp files)
  114.               .../DIR/common/lib (DOC, TUTORIAL, etc.)
  115.               .../DIR/common/lock (lockfiles)
  116. --srcdir=DIR        Look for the Emacs source files in DIR.
  117. --prefix=DIR        Install files below DIR. Defaults to \`${prefix}'.
  118.  
  119. You may also specify any of the \`path' variables found in Makefile.in,
  120. including --bindir, --libdir, --etcdir, --infodir, and so on.  This allows
  121. you to override a single default location when configuring.
  122.  
  123. If successful, ${progname} leaves its status in config.status.  If
  124. unsuccessful after disturbing the status quo, it removes config.status."
  125.  
  126.  
  127. #### Option processing.
  128.  
  129. ### Record all the arguments, so we can save them in config.status.
  130. arguments="$@"
  131.  
  132. ### Shell Magic: Quote the quoted arguments in ARGUMENTS.  At a later date,
  133. ### in order to get the arguments back in $@, we have to do an
  134. ###  `eval set x "$quoted_arguments"; shift'.
  135. quoted_arguments=
  136. for i in "$@"; do
  137.    quoted_arguments="$quoted_arguments '$i'"
  138. done
  139.  
  140. ### Don't use shift -- that destroys the argument list, which autoconf needs
  141. ### to produce config.status.  It turns out that "set - ${arguments}" doesn't
  142. ### work portably.
  143. ### However, it also turns out that many shells cannot expand ${10} at all.
  144. ### So using an index variable doesn't work either.  It is possible to use
  145. ### some shell magic to make 'set x "$arguments"; shift' work portably.
  146. while [ $# != 0 ]; do
  147.   arg="$1"; shift
  148.   case "${arg}" in
  149.  
  150.     ## Anything starting with a hyphen we assume is an option.
  151.     -* )
  152.       ## Separate the switch name from the value it's being given.
  153.       case "${arg}" in
  154.         -*=*)
  155.       opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
  156.       val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
  157.       valomitted=no
  158.     ;;
  159.         -*)
  160.           ## If FOO is a boolean argument, --FOO is equivalent to
  161.           ## --FOO=yes.  Otherwise, the value comes from the next
  162.           ## argument - see below.
  163.       opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
  164.           val="yes"
  165.           valomitted=yes
  166.         ;;
  167.       esac
  168.  
  169.       ## Change `-' in the option name to `_'.
  170.       optname="${opt}"
  171.       opt="`echo ${opt} | tr - _`"
  172.  
  173.       ## Process the option.
  174.       case "${opt}" in
  175.  
  176.         ## Has the user specified which window systems they want to support?
  177.         "with_x" | "with_x11" | "with_x10" )
  178.       ## Make sure the value given was either "yes" or "no".
  179.       case "${val}" in
  180.         y | ye | yes )    val=yes ;;
  181.         n | no )        val=no  ;;
  182.         * )
  183.           (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
  184. Set it to either \`yes' or \`no'."
  185.            echo "${short_usage}") >&2
  186.           exit 1
  187.         ;;
  188.       esac
  189.           eval "${opt}=\"${val}\""
  190.         ;;
  191.  
  192.         ## Has the user specified which toolkit they want to support?
  193.         "with_x_toolkit" )
  194.       case "${val}" in
  195.         y | ye | yes )    val=athena ;;
  196.         n | no )        val=no  ;;
  197.         l | lu | luc | luci | lucid )    val=lucid ;;
  198.         a | at | ath | athe | athena )    val=athena ;;
  199. # These don't currently work.
  200. #        m | mo | mot | moti | motif )    val=motif ;;
  201. #        o | op | ope | open | open- | open-l | open-lo \
  202. #        | open-loo | open-look )    val=open-look ;;
  203.         * )
  204.           (
  205. #echo "${progname}: the \`--${optname}' option is supposed to have a value
  206. #which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'."
  207. echo "${progname}: the \`--${optname}' option is supposed to have a value
  208. which is \`yes', \`no', \`lucid', or \`athena'.
  209. Currently, \`yes', \`athena' and \`lucid' are synonyms."
  210.            echo "${short_usage}") >&2
  211.           exit 1
  212.         ;;
  213.       esac
  214.           eval "${opt}=\"${val}\""
  215.         ;;
  216.  
  217.     ## Has the user specified whether or not they want GCC?
  218.     "with_gcc" | "with_gnu_cc" )
  219.       ## Make sure the value given was either "yes" or "no".
  220.       case "${val}" in
  221.         y | ye | yes )    val=yes ;;
  222.         n | no )        val=no  ;;
  223.         * )
  224.           (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
  225. Set it to either \`yes' or \`no'."
  226.            echo "${short_usage}") >&2
  227.           exit 1
  228.         ;;
  229.       esac
  230.           eval "${opt}=\"${val}\""
  231.         ;;
  232.  
  233.         ## Has the user specified a source directory?
  234.     "srcdir" )
  235.       ## If the value was omitted, get it from the next argument.
  236.       if [ "${valomitted}" = "yes" ]; then
  237.         ## Get the next argument from the argument list, if there is one.
  238.             if [ $# = 0 ]; then
  239.           (echo "${progname}: You must give a value for the \`--${optname}' option, as in
  240.     \`--${optname}=FOO'."
  241.            echo "${short_usage}") >&2
  242.           exit 1
  243.         fi
  244.         val="$1"; shift
  245.       fi
  246.           srcdir="${val}"
  247.     ;;
  248.  
  249.     ## Has the user tried to tell us where the X files are?
  250.     ## I think these are dopey, but no less than three alpha
  251.     ## testers, at large sites, have said they have their X files
  252.     ## installed in odd places.
  253.     "x_includes" )
  254.       ## If the value was omitted, get it from the next argument.
  255.       if [ "${valomitted}" = "yes" ]; then
  256.         ## Get the next argument from the argument list, if there is one.
  257.             if [ $# = 0 ]; then
  258.           (echo "${progname}: You must give a value for the \`--${optname}' option, as in
  259.     \`--${optname}=/usr/local/X11/include'."
  260.            echo "${short_usage}") >&2
  261.           exit 1
  262.         fi
  263.             val="$1"; shift
  264.       fi
  265.       x_includes="${val}"
  266.         ;;
  267.     "x_libraries" )
  268.       ## If the value was omitted, get it from the next argument.
  269.       if [ "${valomitted}" = "yes" ]; then
  270.         ## Get the next argument from the argument list, if there is one.
  271.             if [ $# = 0 ]; then
  272.           (echo "${progname}: You must give a value for the \`--${optname}' option, as in
  273.     \`--${optname}=/usr/local/X11/lib'."
  274.            echo "${short_usage}") >&2
  275.           exit 1
  276.         fi
  277.             val="$1"; shift
  278.       fi
  279.       x_libraries="${val}"
  280.         ;;
  281.  
  282.     ## Should this use the "development" file organization?
  283.     "run_in_place" )
  284.       single_tree=
  285.       run_in_place=1
  286.     ;;
  287.  
  288.         ## Should this use the "single tree" file organization?
  289.     "single_tree" )
  290.        run_in_place=
  291.        single_tree=1
  292.     ;;
  293.  
  294.     ## Has the user specified one of the path options?
  295.     prefix | exec_prefix | bindir | libdir | etcdir | datadir | \
  296.     archlibdir | statedir | mandir | infodir | lispdir | lockdir | \
  297.     lisppath | locallisppath | docdir )
  298.        ## If the value was omitted, get it from the next argument.
  299.        if [ "${valomitted}" = "yes" ]; then
  300.           if [ $# = 0 ]; then
  301.          (echo \
  302. "$progname: You must give a value for the \`--${optname}' option,";
  303.           echo \
  304. "as in \`--${optname}=`eval echo '$'$optname`.'"
  305.           echo "$short_usage") >&2
  306.          exit 1
  307.           fi
  308.           val="$1"; shift
  309.        fi
  310.        eval "${opt}=\"${val}\""
  311.        eval "${opt}_specified=1"
  312.     ;;
  313.  
  314.     ## Verbose flag, tested by autoconf macros.
  315.     "verbose" )
  316.       verbose=yes
  317.     ;;
  318.  
  319.     ## Has the user asked for some help?
  320.     "usage" | "help" )
  321.       if [ "x$PAGER" = x ]
  322.       then
  323.         echo "${short_usage}" | more
  324.       else
  325.         echo "${short_usage}" | $PAGER
  326.       fi
  327.       exit
  328.     ;;
  329.  
  330.         ## We ignore all other options silently.
  331.       esac
  332.     ;;
  333.  
  334.     ## Anything not starting with a hyphen we assume is a
  335.     ## configuration name.
  336.     *)
  337.       configuration=${arg}
  338.     ;;
  339.  
  340.   esac
  341. done
  342.  
  343. ### Get the arguments back.  See the diatribe on Shell Magic above.
  344. eval set x "$quoted_arguments"; shift
  345.  
  346. if [ "${configuration}" = "" ]; then
  347.   echo '- You did not tell me what kind of host system you want to configure.
  348. - I will attempt to guess the kind of system this is.' 1>&2
  349.   guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
  350.   if configuration=`${guesssys}` ; then
  351.     echo "- Looks like this is a ${configuration}" 1>&2
  352.   else
  353.     echo '- Failed to guess the system type.  You need to tell me.' 1>&2
  354.     echo "${short_usage}" >&2
  355.     exit 1
  356.   fi
  357. fi
  358.  
  359. #### Decide where the source is.
  360. case "${srcdir}" in
  361.  
  362.   ## If it's not specified, see if  `.' or `..' might work.
  363.   "" )
  364.     confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
  365.     if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
  366.       srcdir="${confdir}"
  367.     else
  368.       if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
  369.         srcdir='.'
  370.       else
  371.         if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
  372.       srcdir='..'
  373.         else
  374.       (echo "\
  375. ${progname}: Neither the current directory nor its parent seem to
  376. contain the Emacs sources.  If you do not want to build Emacs in its
  377. source tree, you should run \`${progname}' in the directory in which
  378. you wish to build Emacs, using its \`--srcdir' option to say where the
  379. sources may be found."
  380.         echo "${short_usage}") >&2
  381.       exit 1
  382.         fi
  383.       fi
  384.     fi
  385.   ;;
  386.  
  387.   ## Otherwise, check if the directory they specified is okay.
  388.   * )
  389.     if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
  390.       (echo "\
  391. ${progname}: The directory specified with the \`--srcdir' option,
  392. \`${srcdir}', doesn't seem to contain the Emacs sources.  You should
  393. either run the \`${progname}' script at the top of the Emacs source
  394. tree, or use the \`--srcdir' option to specify where the Emacs sources
  395. are."
  396.        echo "${short_usage}") >&2
  397.       exit 1
  398.     fi
  399.   ;;
  400. esac
  401.  
  402. #### Make srcdir absolute, if it isn't already.  It's important to
  403. #### avoid running the path through pwd unnecessary, since pwd can
  404. #### give you automounter prefixes, which can go away.
  405. case "${srcdir}" in
  406.   /* ) ;;
  407.   . )
  408.     ## We may be able to use the $PWD environment variable to make this
  409.     ## absolute.  But sometimes PWD is inaccurate.
  410.     if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ] ; then
  411.       srcdir="$PWD"
  412.     else
  413.       srcdir="`(cd ${srcdir}; pwd)`"
  414.     fi
  415.   ;;
  416.   *  ) srcdir="`(cd ${srcdir}; pwd)`" ;;
  417. esac
  418.  
  419. #### Check if the source directory already has a configured system in it.
  420. if [ `pwd` != `(cd ${srcdir} && pwd)` ] \
  421.    && [ -f "${srcdir}/src/config.h" ] ; then
  422.   (echo "${progname}: WARNING: The directory tree \`${srcdir}' is being used"
  423.    echo "   as a build directory right now; it has been configured in its own"
  424.    echo "   right.  To configure in another directory as well, you MUST"
  425.    echo "   use GNU make.  If you do not have GNU make, then you must"
  426.    echo "   now do \`make distclean' in ${srcdir},"
  427.    echo "   and then run ${progname} again.") >&2
  428.   extrasub='/^VPATH[     ]*=/c\
  429. vpath %.c $(srcdir)\
  430. vpath %.h $(srcdir)\
  431. vpath %.y $(srcdir)\
  432. vpath %.l $(srcdir)\
  433. vpath %.s $(srcdir)\
  434. vpath %.in $(srcdir)'
  435. fi
  436.  
  437. ### Make the necessary directories, if they don't exist.
  438. for dir in ./src ./lib-src ./cpp ./oldXMenu ./lwlib ./etc ; do
  439.   if [ ! -d ${dir} ]; then
  440.     mkdir ${dir}
  441.   fi
  442. done
  443.  
  444. #### Given the configuration name, set machfile and opsysfile to the
  445. #### names of the m/*.h and s/*.h files we should use.
  446.  
  447. ### Canonicalize the configuration name.
  448. echo "Checking the configuration name"
  449. if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else
  450.   exit $?
  451. fi
  452.  
  453. ### If you add support for a new configuration, add code to this
  454. ### switch statement to recognize your configuration name and select
  455. ### the appropriate operating system and machine description files.
  456.  
  457. ### You would hope that you could choose an m/*.h file pretty much
  458. ### based on the machine portion of the configuration name, and an s-
  459. ### file based on the operating system portion.  However, it turns out
  460. ### that each m/*.h file is pretty manufacturer-specific - for
  461. ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
  462. ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
  463. ### machines.  So we basically have to have a special case for each
  464. ### configuration name.
  465. ###
  466. ### As far as handling version numbers on operating systems is
  467. ### concerned, make sure things will fail in a fixable way.  If
  468. ### /etc/MACHINES doesn't say anything about version numbers, be
  469. ### prepared to handle anything reasonably.  If version numbers
  470. ### matter, be sure /etc/MACHINES says something about it.
  471. ###
  472. ### Eric Raymond says we should accept strings like "sysvr4" to mean
  473. ### "System V Release 4"; he writes, "The old convention encouraged
  474. ### confusion between `system' and `release' levels'."
  475.  
  476. machine='' opsys='' unported='false'
  477. case "${canonical}" in
  478.  
  479.   ## NetBSD ports
  480.   *-*-netbsd* )
  481.     opsys=netbsd
  482.     case "${canonical}" in
  483.       i[345]86-*-netbsd*) machine=intel386 ;;
  484.       m68k-*-netbsd*)
  485.             # This is somewhat bogus.
  486.             machine=hp9000s300 ;;
  487.       mips-*-netbsd*)    machine=pmax ;;
  488.       ns32k-*-netbsd*)    machine=ns32000 ;;
  489.       sparc-*-netbsd*)    machine=sparc ;;
  490.     esac
  491.   ;;
  492.  
  493.   ## Alliant machines
  494.   ## Strictly speaking, we need the version of the alliant operating
  495.   ## system to choose the right machine file, but currently the
  496.   ## configuration name doesn't tell us enough to choose the right
  497.   ## one; we need to give alliants their own operating system name to
  498.   ## do this right.  When someone cares, they can help us.
  499.   fx80-alliant-* )
  500.     machine=alliant4 opsys=bsd4-2
  501.   ;;
  502.   i860-alliant-* )
  503.     machine=alliant-2800 opsys=bsd4-3
  504.   ;;
  505.  
  506.   ## Altos 3068
  507.   m68*-altos-sysv* )
  508.     machine=altos opsys=usg5-2
  509.   ;;
  510.     
  511.   ## Amdahl UTS
  512.   580-amdahl-sysv* )
  513.     machine=amdahl opsys=usg5-2-2
  514.   ;;
  515.  
  516.   ## Appallings - I mean, Apollos - running Domain
  517.   m68*-apollo* )
  518.     machine=apollo opsys=bsd4-2
  519.   ;;
  520.  
  521.   ## AT&T 3b2, 3b5, 3b15, 3b20
  522.   we32k-att-sysv* )
  523.     machine=att3b opsys=usg5-2-2
  524.   ;;
  525.  
  526.   ## AT&T 3b1 - The Mighty Unix PC!
  527.   m68*-att-sysv* )
  528.     machine=7300 opsys=usg5-2-2
  529.   ;;
  530.  
  531.   ## Bull dpx20
  532.   rs6000-bull-bosx* )
  533.     machine=ibmrs6000 opsys=aix3-2
  534.   ;;
  535.  
  536.   ## Bull dpx2
  537.   m68*-bull-sysv3* )
  538.     machine=dpx2 opsys=usg5-3
  539.   ;;
  540.  
  541.   ## Bull sps7
  542.   m68*-bull-sysv2* )
  543.     machine=sps7 opsys=usg5-2
  544.   ;;
  545.  
  546.   ## CCI 5/32, 6/32 -- see "Tahoe".
  547.  
  548.   ## Celerity
  549.   ## I don't know what configuration name to use for this; config.sub
  550.   ## doesn't seem to know anything about it.  Hey, Celerity users, get
  551.   ## in touch with us!
  552.   celerity-celerity-bsd* )
  553.     machine=celerity opsys=bsd4-2
  554.   ;;
  555.  
  556.   ## Clipper
  557.   ## What operating systems does this chip run that Emacs has been
  558.   ## tested on?
  559.   clipper-* )
  560.     machine=clipper
  561.     ## We'll use the catch-all code at the bottom to guess the
  562.     ## operating system.
  563.   ;;
  564.  
  565.   ## Convex
  566.   *-convex-bsd* | *-convex-convexos* )
  567.     machine=convex opsys=bsd4-3
  568.     ## Prevents suprious white space in makefiles - d.m.cooke@larc.nasa.gov
  569.     NON_GNU_CPP="cc -E -P"
  570.   ;;
  571.  
  572.   ## Cubix QBx/386
  573.   i[345]86-cubix-sysv* )
  574.     machine=intel386 opsys=usg5-3
  575.   ;;
  576.  
  577.   ## Cydra 5
  578.   cydra*-cydrome-sysv* )
  579.     machine=cydra5 opsys=usg5-3
  580.   ;;
  581.  
  582.   ## Data General AViiON Machines
  583.   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
  584.     machine=aviion opsys=dgux5-4r3
  585.   ;;
  586.   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
  587.     machine=aviion opsys=dgux5-4r2
  588.   ;;
  589.   m88k-dg-dgux* )
  590.     machine=aviion opsys=dgux
  591.   ;;
  592.  
  593.   ## DECstations
  594.   mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
  595.     machine=pmax opsys=bsd4-2
  596.   ;;
  597.   mips-dec-ultrix* | mips-dec-bsd* )
  598.     machine=pmax opsys=bsd4-3
  599.   ;;
  600.   mips-dec-osf* )
  601.     machine=pmax opsys=osf1
  602.   ;;
  603.  
  604.   ## Motorola Delta machines
  605.   m68k-motorola-sysv* | m68000-motorola-sysv* )
  606.     machine=delta opsys=usg5-3
  607.     if [ -z "`type gnucc | grep 'not found'`" ]
  608.     then CC=gnucc
  609.     else
  610.       if [ -z "`type gcc | grep 'not found'`" ]
  611.       then CC=gcc
  612.       else CC=cc
  613.       fi
  614.     fi
  615.   ;;
  616.   m88k-motorola-sysv4* )
  617.     machine=delta88k opsys=usg5-4
  618.   ;;
  619.   m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
  620.     machine=delta88k opsys=usg5-3
  621.   ;;
  622.  
  623.   ## Dual machines
  624.   m68*-dual-sysv* )
  625.     machine=dual opsys=usg5-2
  626.   ;;
  627.   m68*-dual-uniplus* )
  628.     machine=dual opsys=unipl5-2
  629.   ;;
  630.  
  631.   ## Elxsi 6400
  632.   elxsi-elxsi-sysv* )
  633.     machine=elxsi opsys=usg5-2
  634.   ;;
  635.  
  636.   ## Encore machines
  637.   ns16k-encore-bsd* )
  638.     machine=ns16000 opsys=umax
  639.   ;;
  640.  
  641.   ## The GEC 93 - apparently, this port isn't really finished yet.
  642.  
  643.   ## Gould Power Node and NP1
  644.   pn-gould-bsd4.2* )
  645.     machine=gould opsys=bsd4-2
  646.   ;;
  647.   pn-gould-bsd4.3* )
  648.     machine=gould opsys=bsd4-3
  649.   ;;
  650.   np1-gould-bsd* )
  651.     machine=gould-np1 opsys=bsd4-3
  652.   ;;
  653.  
  654.   ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
  655.   ## as far as Emacs is concerned).
  656.   m88k-harris-cxux* )
  657.     # Build needs to be different on 7.0 and later releases
  658.     case "`uname -r`" in
  659.        [56].[0-9] ) machine=nh4000 opsys=cxux ;;
  660.        [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
  661.     esac
  662.   ;;
  663.   ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
  664.   m68k-harris-cxux* )
  665.     machine=nh3000 opsys=cxux
  666.   ;;
  667.  
  668.   ## Honeywell XPS100
  669.   xps*-honeywell-sysv* )
  670.     machine=xps100 opsys=usg5-2
  671.   ;;
  672.  
  673.   ## HP 9000 series 200 or 300
  674.   m68*-hp-bsd* )
  675.     machine=hp9000s300 opsys=bsd4-3
  676.   ;;
  677.   ## HP/UX 7, 8 and 9 are supported on these machines.
  678.   m68*-hp-hpux* )
  679.     case "`uname -r`" in
  680.       ## Someone's system reports A.B8.05 for this.
  681.       ## I wonder what other possibilities there are.
  682.       *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
  683.       *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
  684.       *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
  685.       *) machine=hp9000s300 opsys=hpux ;;
  686.     esac
  687.   ;;
  688.  
  689.   ## HP 9000 series 700 and 800, running HP/UX
  690.   hppa*-hp-hpux7* )
  691.     machine=hp800 opsys=hpux
  692.   ;;
  693.   hppa*-hp-hpux8* )
  694.     machine=hp800 opsys=hpux8
  695.   ;;
  696.   hppa*-hp-hpux9shr* )
  697.     machine=hp800 opsys=hpux9shr
  698.   ;;
  699.   hppa*-hp-hpux9* )
  700.     machine=hp800 opsys=hpux9
  701.   ;;
  702.  
  703.   ## HP 9000 series 700 and 800, running HP/UX
  704.   hppa*-hp-hpux* )
  705.     ## Cross-compilation?  Nah!
  706.     case "`uname -r`" in
  707.       ## Someone's system reports A.B8.05 for this.
  708.       ## I wonder what other possibilities there are.
  709.       *.B8.* ) machine=hp800 opsys=hpux8 ;;
  710.       *.08.* ) machine=hp800 opsys=hpux8 ;;
  711.       *.09.* ) machine=hp800 opsys=hpux9 ;;
  712.       *) machine=hp800 opsys=hpux ;;
  713.     esac
  714.   ;;
  715.  
  716.   ## Orion machines
  717.   orion-orion-bsd* )
  718.     machine=orion opsys=bsd4-2
  719.   ;;
  720.   clipper-orion-bsd* )
  721.     machine=orion105 opsys=bsd4-2
  722.   ;;
  723.  
  724.   ## IBM machines
  725.   i[345]86-ibm-aix1.1* )
  726.     machine=ibmps2-aix opsys=usg5-2-2
  727.   ;;
  728.   i[345]86-ibm-aix1.[23]* | i[345]86-ibm-aix* )
  729.     machine=ibmps2-aix opsys=usg5-3
  730.   ;;
  731.   i370-ibm-aix*)
  732.     machine=ibm370aix opsys=usg5-3
  733.   ;;
  734.   rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1*  )
  735.     machine=ibmrs6000 opsys=aix3-1
  736.   ;;
  737.   rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
  738.     machine=ibmrs6000 opsys=aix3-2-5
  739.   ;;
  740.   rs6000-ibm-aix* | powerpc-ibm-aix* )
  741.     machine=ibmrs6000 opsys=aix3-2
  742.   ;;
  743.   romp-ibm-bsd4.3* )
  744.     machine=ibmrt opsys=bsd4-3
  745.   ;;    
  746.   romp-ibm-bsd4.2* )
  747.     machine=ibmrt opsys=bsd4-2
  748.   ;;
  749.   romp-ibm-aos4.3* )
  750.     machine=ibmrt opsys=bsd4-3
  751.   ;;    
  752.   romp-ibm-aos4.2* )
  753.     machine=ibmrt opsys=bsd4-2
  754.   ;;
  755.   romp-ibm-aos* )
  756.     machine=ibmrt opsys=bsd4-3
  757.   ;;
  758.   romp-ibm-bsd* )
  759.     machine=ibmrt opsys=bsd4-3
  760.   ;;
  761.   romp-ibm-aix* )
  762.     machine=ibmrt-aix opsys=usg5-2-2
  763.   ;;
  764.  
  765.   ## Integrated Solutions `Optimum V'
  766.   m68*-isi-bsd4.2* )
  767.     machine=isi-ov opsys=bsd4-2
  768.   ;;
  769.   m68*-isi-bsd4.3* )
  770.     machine=isi-ov opsys=bsd4-3
  771.   ;;
  772.  
  773.   ## Intel 386 machines where we do care about the manufacturer
  774.   i[345]86-intsys-sysv* )
  775.     machine=is386 opsys=usg5-2-2
  776.   ;;
  777.  
  778.   ## Prime EXL
  779.   i[345]86-prime-sysv* )
  780.     machine=i386 opsys=usg5-3
  781.   ;;
  782.  
  783.   ## Sequent Symmetry
  784.   i[345]86-sequent-bsd* )
  785.     machine=symmetry opsys=bsd4-3
  786.   ;;
  787.  
  788.   ## Unspecified sysv on an ncr machine defaults to svr4.2.
  789.   ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
  790.   i[345]86-ncr-sysv* )
  791.     machine=intel386 opsys=usg5-4-2
  792.   ;;
  793.  
  794.   ## Intel 860
  795.   i860-*-sysv4* )
  796.     machine=i860 opsys=usg5-4
  797.     NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
  798.     NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
  799.   ;;
  800.  
  801.   ## Masscomp machines
  802.   m68*-masscomp-rtu* )
  803.     machine=masscomp opsys=rtu
  804.   ;;
  805.  
  806.   ## Megatest machines
  807.   m68*-megatest-bsd* )
  808.     machine=mega68 opsys=bsd4-2
  809.   ;;
  810.  
  811.   ## Workstations sold by MIPS
  812.   ## This is not necessarily all workstations using the MIPS processor -
  813.   ## Irises are produced by SGI, and DECstations by DEC.
  814.  
  815.   ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
  816.   ## and usg5-2-2 and bsd4-3 as possible OS files.  The only guidance
  817.   ## it gives for choosing between the alternatives seems to be "Use
  818.   ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
  819.   ## the BSD world."  I'll assume that these are instructions for
  820.   ## handling two odd situations, and that every other situation
  821.   ## should use mips.h and usg5-2-2, they being listed first.
  822.   mips-mips-usg* )
  823.     machine=mips4
  824.     ## Fall through to the general code at the bottom to decide on the OS.
  825.   ;;
  826.   mips-mips-riscos4* )
  827.     machine=mips4 opsys=bsd4-3
  828.     NON_GNU_CC="cc -systype bsd43"
  829.     NON_GNU_CPP="cc -systype bsd43 -E"
  830.   ;;
  831.   mips-mips-bsd* )
  832.     machine=mips opsys=bsd4-3
  833.   ;;
  834.   mips-mips-* )
  835.     machine=mips opsys=usg5-2-2
  836.   ;;
  837.  
  838.   ## NeXT
  839.   m68*-next-* | i[345]86-next-* )
  840.     machine=next opsys=mach2
  841.   ;;
  842.  
  843.   ## The complete machine from National Semiconductor
  844.   ns32k-ns-genix* )
  845.     machine=ns32000 opsys=usg5-2
  846.   ;;
  847.  
  848.   ## NCR machines
  849.   m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
  850.     machine=tower32 opsys=usg5-2-2
  851.   ;;
  852.   m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
  853.     machine=tower32v3 opsys=usg5-3
  854.   ;;
  855.  
  856.   ## Nixdorf Targon 31
  857.   m68*-nixdorf-sysv* )
  858.     machine=targon31 opsys=usg5-2-2
  859.   ;;
  860.  
  861.   ## Nu (TI or LMI)
  862.   m68*-nu-sysv* )
  863.     machine=nu opsys=usg5-2
  864.   ;;
  865.  
  866.   ## Plexus
  867.   m68*-plexus-sysv* )
  868.     machine=plexus opsys=usg5-2
  869.   ;;
  870.  
  871.   ## Pyramid machines
  872.   ## I don't really have any idea what sort of processor the Pyramid has,
  873.   ## so I'm assuming it is its own architecture.
  874.   pyramid-pyramid-bsd* )
  875.     machine=pyramid opsys=bsd4-2
  876.   ;;
  877.  
  878.   ## Sequent Balance
  879.   ns32k-sequent-bsd4.2* )
  880.     machine=sequent opsys=bsd4-2
  881.   ;;
  882.   ns32k-sequent-bsd4.3* )
  883.     machine=sequent opsys=bsd4-3
  884.   ;;
  885.  
  886.   ## Siemens Nixdorf
  887.   mips-siemens-sysv* )
  888.     machine=mips-siemens opsys=usg5-4
  889.     NON_GNU_CC=/usr/ccs/bin/cc
  890.     NON_GNU_CPP=/usr/ccs/lib/cpp
  891.   ;;
  892.  
  893.   ## Silicon Graphics machines
  894.   ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
  895.   m68*-sgi-iris3.5* )
  896.     machine=irist opsys=iris3-5
  897.   ;;
  898.   m68*-sgi-iris3.6* | m68*-sgi-iris*)
  899.     machine=irist opsys=iris3-6
  900.   ;;
  901.   ## Iris 4D
  902.   mips-sgi-irix3* )
  903.     machine=iris4d opsys=irix3-3
  904.   ;;
  905.   mips-sgi-irix5* )
  906.     machine=iris4d opsys=irix5-0
  907.   ;;
  908.   mips-sgi-irix4* | mips-sgi-irix* )
  909.     machine=iris4d opsys=irix4-0
  910.   ;;
  911.  
  912.   ## SONY machines
  913.   m68*-sony-bsd4.2* )
  914.     machine=news opsys=bsd4-2
  915.   ;;
  916.   m68*-sony-bsd4.3* )
  917.     machine=news opsys=bsd4-3
  918.   ;;
  919.   m68*-sony-newsos3*)
  920.     machine=news opsys=bsd4-3
  921.   ;;
  922.   mips-sony-bsd* | mips-sony-newsos4* )
  923.     machine=news-risc opsys=bsd4-3
  924.   ;;
  925.   mips-sony-newsos* )
  926.     machine=news-risc opsys=newsos5
  927.   ;;
  928.  
  929.   ## Stride
  930.   m68*-stride-sysv* )
  931.     machine=stride opsys=usg5-2
  932.   ;;
  933.  
  934.   ## Suns
  935.   *-sun-sunos* | *-sun-bsd* | *-sun-solaris* | i[345]86-*-solaris2* | i[345]86-*-sunos5* )
  936.     case "${canonical}" in
  937.       m68*-sunos1* )    machine=sun1 ;;
  938.       m68*-sunos2* )    machine=sun2 ;;
  939.       m68* )        machine=sun3 ;;
  940.       i[345]86-sun-sunos[34]* )    machine=sun386 ;;
  941.       i[345]86-*-* )     machine=intel386 ;;
  942.       sparc* )        machine=sparc ;;
  943.       * )        unported=true ;;
  944.     esac
  945.     case "${canonical}" in
  946.       ## The Sun386 didn't get past 4.0.
  947.       i[345]86-*-sunos4      ) opsys=sunos4-0 ;;
  948.       *-sunos4.0*      ) opsys=sunos4-0 ;;
  949.       *-sunos4.1.3*      ) opsys=sunos4-1-3
  950.         NON_GCC_TEST_OPTIONS=-Bstatic
  951.         GCC_TEST_OPTIONS=-static
  952.         ;;
  953.       *-sunos4shr*      ) opsys=sunos4shr ;;
  954.       *-sunos4* | *-sunos ) opsys=sunos4-1
  955.         NON_GCC_TEST_OPTIONS=-Bstatic
  956.         GCC_TEST_OPTIONS=-static
  957.         ;;
  958.       *-sunos5.3* | *-solaris2.3* )
  959.         opsys=sol2-3
  960.         NON_GNU_CPP=/usr/ccs/lib/cpp
  961.         ;;
  962.       *-sunos5.4* | *-solaris2.4* )
  963.         opsys=sol2-4
  964.         NON_GNU_CPP=/usr/ccs/lib/cpp
  965.         ;;
  966.       *-sunos5* | *-solaris* )
  967.         opsys=sol2
  968.         NON_GNU_CPP=/usr/ccs/lib/cpp
  969.         ;;
  970.       *              ) opsys=bsd4-2   ;;
  971.     esac
  972.   ;;
  973.  
  974.   ## Tadpole 68k
  975.   m68*-tadpole-sysv* )
  976.     machine=tad68k opsys=usg5-3
  977.   ;;
  978.  
  979.   ## Tahoe machines
  980.   tahoe-tahoe-bsd4.2* )
  981.     machine=tahoe opsys=bsd4-2
  982.   ;;
  983.   tahoe-tahoe-bsd4.3* )
  984.     machine=tahoe opsys=bsd4-3
  985.   ;;
  986.  
  987.   ## Tandem Integrity S2
  988.   mips-tandem-sysv* )
  989.     machine=tandem-s2 opsys=usg5-3
  990.   ;;
  991.  
  992.   ## Tektronix XD88
  993.   m88k-tektronix-sysv3* )
  994.   machine=tekxd88 opsys=usg5-3
  995.   ;;
  996.  
  997.   ## Tektronix 16000 box (6130?)
  998.   ns16k-tektronix-bsd* )
  999.     machine=ns16000 opsys=bsd4-2
  1000.   ;;
  1001.   ## Tektronix 4300
  1002.   ## src/m/tek4300.h hints that this is a m68k machine.
  1003.   m68*-tektronix-bsd* )
  1004.     machine=tek4300 opsys=bsd4-3
  1005.   ;;
  1006.  
  1007.   ## Titan P2 or P3
  1008.   ## We seem to have lost the machine-description file titan.h!
  1009.   titan-titan-sysv* )
  1010.     machine=titan opsys=usg5-3
  1011.   ;;
  1012.   
  1013.   ## Ustation E30 (SS5E)
  1014.   m68*-unisys-uniplus* )
  1015.     machine=ustation opsystem=unipl5-2
  1016.   ;;
  1017.  
  1018.   ## Vaxen.
  1019.   vax-dec-* )
  1020.     machine=vax
  1021.     case "${canonical}" in
  1022.       *-bsd4.1* )                     opsys=bsd4-1 ;;
  1023.       *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* )    opsys=bsd4-2 ;;
  1024.       *-bsd4.3* | *-ultrix* )                 opsys=bsd4-3 ;;
  1025.       *-bsd386* | *-bsdi* )                opsys=bsd386 ;;
  1026.       *-sysv[01]* | *-sysvr[01]* )             opsys=usg5-0 ;;
  1027.       *-sysv2* | *-sysvr2* )                opsys=usg5-2 ;;
  1028.       *-vms* )                         opsys=vms ;;
  1029.       * )                         unported=true
  1030.     esac
  1031.   ;;
  1032.  
  1033.   ## Whitechapel MG1
  1034.   ns16k-whitechapel-* )
  1035.     machine=mg1
  1036.     ## We don't know what sort of OS runs on these; we'll let the
  1037.     ## operating system guessing code below try.
  1038.   ;;
  1039.  
  1040.   ## Wicat
  1041.   m68*-wicat-sysv* )
  1042.     machine=wicat opsys=usg5-2
  1043.   ;;
  1044.  
  1045.   ## Intel 386 machines where we don't care about the manufacturer
  1046.   i[345]86-*-* )
  1047.     machine=intel386
  1048.     case "${canonical}" in
  1049.       *-isc1.* | *-isc2.[01]* )    opsys=386-ix ;;
  1050.       *-isc2.2* )        opsys=isc2-2 ;;
  1051.       *-isc4.0* )        opsys=isc4-0 ;;
  1052.       *-isc* )            opsys=isc3-0 ;;
  1053.       *-esix5* )        opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
  1054.       *-esix* )            opsys=esix ;;
  1055.       *-xenix* )        opsys=xenix ;;
  1056.       *-linux* )        opsys=linux ;;
  1057.       *-sco3.2v4* )        opsys=sco4 ; NON_GNU_CPP=/lib/cpp  ;;
  1058.       *-bsd386* | *-bsdi* )    opsys=bsd386 ;;
  1059.       *-386bsd* )            opsys=386bsd ;;
  1060.       *-freebsd* )            opsys=freebsd ;;
  1061.       *-nextstep* )             opsys=mach2 ;;
  1062.       ## Otherwise, we'll fall through to the generic opsys code at the bottom.
  1063.     esac
  1064.   ;;
  1065.  
  1066.   * )
  1067.     unported=true
  1068.   ;;
  1069. esac
  1070.  
  1071. ### If the code above didn't choose an operating system, just choose
  1072. ### an operating system based on the configuration name.  You really
  1073. ### only want to use this when you have no idea what the right
  1074. ### operating system is; if you know what operating systems a machine
  1075. ### runs, it's cleaner to make it explicit in the case statement
  1076. ### above.
  1077. if [ x"${opsys}" = x ]; then
  1078.   case "${canonical}" in
  1079.     *-gnu* )                opsys=gnu ;;
  1080.     *-bsd4.[01] )            opsys=bsd4-1 ;;
  1081.     *-bsd4.2 )                opsys=bsd4-2 ;;
  1082.     *-bsd4.3 )                opsys=bsd4-3 ;;
  1083.     *-sysv0 | *-sysvr0 )        opsys=usg5-0 ;;
  1084.     *-sysv2 | *-sysvr2 )        opsys=usg5-2 ;;
  1085.     *-sysv2.2 | *-sysvr2.2 )        opsys=usg5-2-2 ;;
  1086.     *-sysv3 | *-sysvr3 )        opsys=usg5-3 ;;
  1087.     *-sysv4 | *-sysvr4 )        opsys=usg5-4 ;;
  1088.     *-sysv4.1 | *-sysvr4.1 )
  1089.     NON_GNU_CPP=/usr/lib/cpp
  1090.     opsys=usg5-4 ;;
  1091.     *-sysv4.2 | *-sysvr4.2 )        opsys=usg5-4-2 ;;
  1092.     * )
  1093.       unported=true
  1094.     ;;
  1095.   esac
  1096. fi
  1097.  
  1098. if $unported ; then
  1099.   (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems."
  1100.    echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
  1101.   ) >&2
  1102.   exit 1
  1103. fi
  1104.  
  1105. machfile="m/${machine}.h"
  1106. opsysfile="s/${opsys}.h"
  1107.  
  1108.  
  1109. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  1110. trap 'rm -fr confdefs* $ac_clean_files' 0
  1111.  
  1112. # Save the original args if we used an alternate arg parser.
  1113. ac_configure_temp="${configure_args-$*}"
  1114. # Strip out --no-create and --norecursion so they don't pile up.
  1115. configure_args=
  1116. for ac_arg in $ac_configure_temp; do
  1117.   case "$ac_arg" in
  1118.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  1119.   | --no-cr | --no-c) ;;
  1120.   -norecursion | --norecursion | --norecursio | --norecursi \
  1121.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  1122.   *) configure_args="$configure_args $ac_arg" ;;
  1123.   esac
  1124. done
  1125.  
  1126. # NLS nuisances.
  1127. # These must not be set unconditionally because not all systems understand
  1128. # e.g. LANG=C (notably SCO).
  1129. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  1130. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  1131.  
  1132. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  1133. rm -rf conftest* confdefs.h
  1134. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  1135. echo > confdefs.h
  1136.  
  1137. # A filename unique to this package, relative to the directory that
  1138. # configure is in, which we can look for to find out if srcdir is correct.
  1139. ac_unique_file=lisp
  1140.  
  1141. # Find the source files, if location was not specified.
  1142. if test -z "$srcdir"; then
  1143.   ac_srcdir_defaulted=yes
  1144.   # Try the directory containing this script, then `..'.
  1145.   ac_prog=$0
  1146.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  1147.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  1148.   srcdir=$ac_confdir
  1149.   if test ! -r $srcdir/$ac_unique_file; then
  1150.     srcdir=..
  1151.   fi
  1152. fi
  1153. if test ! -r $srcdir/$ac_unique_file; then
  1154.   if test x$ac_srcdir_defaulted = xyes; then
  1155.     echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  1156.   else
  1157.     echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  1158.   fi
  1159. fi
  1160. ac_ext=c
  1161. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1162. ac_cpp='${CPP}'
  1163. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169. #### Choose a compiler.
  1170. if [ "x$CC" = x ]
  1171. then true
  1172. else cc_specified=1
  1173. fi
  1174.  
  1175. case ${with_gcc} in
  1176.   "yes" ) CC="gcc" GCC=1 ;;
  1177.   "no"  )
  1178.     if [ "x$CC" = x ]
  1179.     then CC=cc;
  1180.     else true;
  1181.     fi
  1182.     ;;
  1183.   * )
  1184.      if test -z "$CC"; then
  1185.   # Extract the first word of `gcc', so it can be a program name with args.
  1186.   set ac_dummy gcc; ac_word=$2
  1187.   test -n "$silent" || echo "checking for $ac_word"
  1188.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1189.   for ac_dir in $PATH; do
  1190.     test -z "$ac_dir" && ac_dir=.
  1191.     if test -f $ac_dir/$ac_word; then
  1192.       CC="gcc"
  1193.       break
  1194.     fi
  1195.   done
  1196.   IFS="$ac_save_ifs"
  1197. fi
  1198. test -z "$CC" && CC="cc"
  1199. test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  1200.  
  1201. # Find out if we are using GNU C, under whatever name.
  1202. cat > conftest.c <<EOF
  1203. #ifdef __GNUC__
  1204.   yes
  1205. #endif
  1206. EOF
  1207. ${CC-cc} -E conftest.c > conftest.out 2>&1
  1208. if egrep yes conftest.out >/dev/null 2>&1; then
  1209.   GCC=1 # For later tests.
  1210. fi
  1211. rm -f conftest*
  1212.  
  1213. esac
  1214.  
  1215. #### Some systems specify a CPP to use unless we are using GCC.
  1216. #### Now that we know whether we are using GCC, we can decide whether
  1217. #### to use that one.
  1218. if [ "x$NON_GNU_CPP" = x ] || [ x$GCC = x1 ] || [ "x$CPP" != x ]
  1219. then true
  1220. else
  1221.   CPP="$NON_GNU_CPP"
  1222. fi
  1223.  
  1224. #### Some systems specify a CC to use unless we are using GCC.
  1225. #### Now that we know whether we are using GCC, we can decide whether
  1226. #### to use that one.
  1227. if [ "x$NON_GNU_CC" = x ] || [ x$GCC = x1 ] || [ x$cc_specified = x1 ]
  1228. then true
  1229. else
  1230.   CC="$NON_GNU_CC"
  1231. fi
  1232.  
  1233. if [ x$GCC = x1 ] && [ "x$GCC_TEST_OPTIONS" != x ]
  1234. then
  1235.   CC="$CC $GCC_TEST_OPTIONS"
  1236. fi  
  1237.  
  1238. if [ x$GCC = x ] && [ "x$NON_GCC_TEST_OPTIONS" != x ]
  1239. then
  1240.   CC="$CC $NON_GCC_TEST_OPTIONS"
  1241. fi  
  1242.  
  1243. #### Some other nice autoconf tests.  If you add a test here which
  1244. #### should make an entry in src/config.h, don't forget to add an
  1245. #### #undef clause to src/config.h.in for autoconf to modify.
  1246.  
  1247. test -n "$silent" || echo "checking for ln -s"
  1248. rm -f conftestdata
  1249. if ln -s X conftestdata 2>/dev/null
  1250. then
  1251.   rm -f conftestdata
  1252.   LN_S="ln -s"
  1253. else
  1254.   LN_S=ln
  1255. fi
  1256.  
  1257.  
  1258. test -n "$silent" || echo "checking how to run the C preprocessor"
  1259. if test -z "$CPP"; then
  1260.   # This must be in double quotes, not single quotes, because CPP may get
  1261.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  1262.   # make.  It must be expanded now.
  1263.   CPP="${CC-cc} -E"
  1264.   cat > conftest.${ac_ext} <<EOF
  1265. #include "confdefs.h"
  1266. #include <stdio.h>
  1267. Syntax Error
  1268. EOF
  1269. # Some shells (Coherent) do redirections in the wrong order, so need
  1270. # the parens.
  1271. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1272. if test -z "$ac_err"; then
  1273.   :
  1274. else
  1275.   rm -rf conftest*
  1276.   CPP="${CC-cc} -E -traditional-cpp"
  1277.   cat > conftest.${ac_ext} <<EOF
  1278. #include "confdefs.h"
  1279. #include <stdio.h>
  1280. Syntax Error
  1281. EOF
  1282. # Some shells (Coherent) do redirections in the wrong order, so need
  1283. # the parens.
  1284. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1285. if test -z "$ac_err"; then
  1286.   :
  1287. else
  1288.   rm -rf conftest*
  1289.   CPP=/lib/cpp
  1290. fi
  1291. rm -f conftest*
  1292. fi
  1293. rm -f conftest*
  1294. fi
  1295. test -n "$verbose" && echo "    setting CPP to $CPP"
  1296.  
  1297. # Make sure to not get the incompatible SysV /etc/install and
  1298. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  1299. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  1300. # or the AFS install, which mishandles nonexistent args, or
  1301. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  1302. # `staff', or /sbin/install on IRIX which has incompatible command-line
  1303. # syntax.  Sigh.
  1304. #
  1305. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  1306. #     anyway.
  1307. # This turns out not to be true, so the mere pathname isn't an indication
  1308. # of whether the program works.  What we really need is a set of tests for
  1309. # the install program to see if it actually works in all the required ways.
  1310. #
  1311. # Avoid using ./install, which might have been erroneously created
  1312. # by make from ./install.sh.
  1313. if test -z "${INSTALL}"; then
  1314.   test -n "$silent" || echo "checking for a BSD compatible install"
  1315.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1316.   for ac_dir in $PATH; do
  1317.     case "$ac_dir" in
  1318.     ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  1319.     *)
  1320.       # OSF1 and SCO ODT 3.0 have their own names for install.
  1321.       for ac_prog in installbsd scoinst install; do
  1322.         if test -f $ac_dir/$ac_prog; then
  1323.       if test $ac_prog = install &&
  1324.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1325.         # AIX install.  It has an incompatible calling convention.
  1326.         # OSF/1 installbsd also uses dspmsg, but is usable.
  1327.         :
  1328.       else
  1329.         INSTALL="$ac_dir/$ac_prog -c"
  1330.         break 2
  1331.       fi
  1332.     fi
  1333.       done
  1334.       ;;
  1335.     esac
  1336.   done
  1337.   IFS="$ac_save_ifs"
  1338. fi
  1339.  
  1340. if test -z "$INSTALL"; then
  1341.   # As a last resort, use the slow shell script.
  1342.   for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
  1343.     if test -f $ac_dir/install.sh; then
  1344.       INSTALL="$ac_dir/install.sh -c"; break
  1345.     fi
  1346.   done
  1347. fi
  1348. if test -z "$INSTALL"; then
  1349.   echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
  1350. fi
  1351. test -n "$verbose" && echo "    setting INSTALL to $INSTALL"
  1352.  
  1353. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  1354. # It thinks the first close brace ends the variable substitution.
  1355. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1356. test -n "$verbose" && echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  1357.  
  1358. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1359. test -n "$verbose" && echo "    setting INSTALL_DATA to $INSTALL_DATA"
  1360.  
  1361. for ac_prog in 'bison -y' byacc
  1362. do
  1363. if test -z "$YACC"; then
  1364.   # Extract the first word of `$ac_prog', so it can be a program name with args.
  1365.   set ac_dummy $ac_prog; ac_word=$2
  1366.   test -n "$silent" || echo "checking for $ac_word"
  1367.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1368.   for ac_dir in $PATH; do
  1369.     test -z "$ac_dir" && ac_dir=.
  1370.     if test -f $ac_dir/$ac_word; then
  1371.       YACC="$ac_prog"
  1372.       break
  1373.     fi
  1374.   done
  1375.   IFS="$ac_save_ifs"
  1376. fi
  1377.  
  1378. test -n "$YACC" && test -n "$verbose" && echo "    setting YACC to $YACC"
  1379.  
  1380. test -n "$YACC" && break
  1381. done
  1382. test -n "$YACC" || YACC="yacc"
  1383.  
  1384.  
  1385.  
  1386. for ac_hdr in sys/timeb.h sys/time.h unistd.h
  1387. do
  1388. ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  1389. test -n "$silent" || echo "checking for ${ac_hdr}"
  1390. cat > conftest.${ac_ext} <<EOF
  1391. #include "confdefs.h"
  1392. #include <${ac_hdr}>
  1393. EOF
  1394. # Some shells (Coherent) do redirections in the wrong order, so need
  1395. # the parens.
  1396. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1397. if test -z "$ac_err"; then
  1398.   rm -rf conftest*
  1399.   
  1400. {
  1401. test -n "$verbose" && \
  1402. echo "    defining ${ac_tr_hdr}"
  1403. echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  1404. DEFS="$DEFS -D${ac_tr_hdr}=1"
  1405. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  1406. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  1407. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  1408. "
  1409. }
  1410.  
  1411.  
  1412. fi
  1413. rm -f conftest*
  1414. done
  1415.  
  1416. test -n "$silent" || echo "checking for ANSI C header files"
  1417. cat > conftest.${ac_ext} <<EOF
  1418. #include "confdefs.h"
  1419. #include <stdlib.h>
  1420. #include <stdarg.h>
  1421. #include <string.h>
  1422. #include <float.h>
  1423. EOF
  1424. # Some shells (Coherent) do redirections in the wrong order, so need
  1425. # the parens.
  1426. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1427. if test -z "$ac_err"; then
  1428.   rm -rf conftest*
  1429.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1430. echo '#include "confdefs.h"
  1431. #include <string.h>' > conftest.${ac_ext}
  1432. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1433. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  1434.   rm -rf conftest*
  1435.   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1436. cat > conftest.${ac_ext} <<EOF
  1437. #include "confdefs.h"
  1438. #include <ctype.h>
  1439. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1440. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1441. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  1442. int main () { int i; for (i = 0; i < 256; i++)
  1443. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1444. exit (0); }
  1445.  
  1446. EOF
  1447. eval $ac_compile
  1448. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1449.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1450. echo '#include "confdefs.h"
  1451. #include <stdlib.h>' > conftest.${ac_ext}
  1452. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1453. if egrep "free" conftest.out >/dev/null 2>&1; then
  1454.   rm -rf conftest*
  1455.   
  1456. {
  1457. test -n "$verbose" && \
  1458. echo "    defining STDC_HEADERS"
  1459. echo "#define" STDC_HEADERS "1" >> confdefs.h
  1460. DEFS="$DEFS -DSTDC_HEADERS=1"
  1461. ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
  1462. \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
  1463. \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
  1464. "
  1465. }
  1466.  
  1467.  
  1468. fi
  1469. rm -f conftest*
  1470.  
  1471.  
  1472. fi
  1473. rm -fr conftest*
  1474.  
  1475. fi
  1476. rm -f conftest*
  1477.  
  1478.  
  1479. fi
  1480. rm -f conftest*
  1481.  
  1482. test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included"
  1483. cat > conftest.${ac_ext} <<EOF
  1484. #include "confdefs.h"
  1485. #include <sys/types.h>
  1486. #include <sys/time.h>
  1487. #include <time.h>
  1488. int main() { return 0; }
  1489. int t() { struct tm *tp;; return 0; }
  1490. EOF
  1491. if eval $ac_compile; then
  1492.   rm -rf conftest*
  1493.   
  1494. {
  1495. test -n "$verbose" && \
  1496. echo "    defining TIME_WITH_SYS_TIME"
  1497. echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
  1498. DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
  1499. ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
  1500. \${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
  1501. \${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
  1502. "
  1503. }
  1504.  
  1505.  
  1506. fi
  1507. rm -f conftest*
  1508.  
  1509. test -n "$silent" || echo "checking for sys_siglist declaration in signal.h or unistd.h"
  1510. cat > conftest.${ac_ext} <<EOF
  1511. #include "confdefs.h"
  1512. #include <signal.h>
  1513. /* NetBSD declares sys_siglist in <unistd.h>.  */
  1514. #ifdef HAVE_UNISTD_H
  1515. #include <unistd.h>
  1516. #endif
  1517. int main() { return 0; }
  1518. int t() { char *msg = *(sys_siglist + 1);; return 0; }
  1519. EOF
  1520. if eval $ac_compile; then
  1521.   rm -rf conftest*
  1522.   
  1523. {
  1524. test -n "$verbose" && \
  1525. echo "    defining SYS_SIGLIST_DECLARED"
  1526. echo "#define" SYS_SIGLIST_DECLARED "1" >> confdefs.h
  1527. DEFS="$DEFS -DSYS_SIGLIST_DECLARED=1"
  1528. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYS_SIGLIST_DECLARED\${ac_dB}SYS_SIGLIST_DECLARED\${ac_dC}1\${ac_dD}
  1529. \${ac_uA}SYS_SIGLIST_DECLARED\${ac_uB}SYS_SIGLIST_DECLARED\${ac_uC}1\${ac_uD}
  1530. \${ac_eA}SYS_SIGLIST_DECLARED\${ac_eB}SYS_SIGLIST_DECLARED\${ac_eC}1\${ac_eD}
  1531. "
  1532. }
  1533.  
  1534.  
  1535. fi
  1536. rm -f conftest*
  1537.  
  1538.  
  1539. test -n "$silent" || echo "checking for return type of signal handlers"
  1540. cat > conftest.${ac_ext} <<EOF
  1541. #include "confdefs.h"
  1542. #include <sys/types.h>
  1543. #include <signal.h>
  1544. #ifdef signal
  1545. #undef signal
  1546. #endif
  1547. extern void (*signal ()) ();
  1548. int main() { return 0; }
  1549. int t() { int i;; return 0; }
  1550. EOF
  1551. if eval $ac_compile; then
  1552.   rm -rf conftest*
  1553.   
  1554. {
  1555. test -n "$verbose" && \
  1556. echo "    defining" RETSIGTYPE to be "void"
  1557. echo "#define" RETSIGTYPE "void" >> confdefs.h
  1558. DEFS="$DEFS -DRETSIGTYPE=void"
  1559. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
  1560. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
  1561. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
  1562. "
  1563. }
  1564.  
  1565.  
  1566. else
  1567.   rm -rf conftest*
  1568.   
  1569. {
  1570. test -n "$verbose" && \
  1571. echo "    defining" RETSIGTYPE to be "int"
  1572. echo "#define" RETSIGTYPE "int" >> confdefs.h
  1573. DEFS="$DEFS -DRETSIGTYPE=int"
  1574. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
  1575. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
  1576. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
  1577. "
  1578. }
  1579.  
  1580. fi
  1581. rm -f conftest*
  1582.  
  1583.  
  1584.  
  1585. test -n "$silent" || echo "checking for struct tm in time.h"
  1586. cat > conftest.${ac_ext} <<EOF
  1587. #include "confdefs.h"
  1588. #include <sys/types.h>
  1589. #include <time.h>
  1590. int main() { return 0; }
  1591. int t() { struct tm *tp; tp->tm_sec;; return 0; }
  1592. EOF
  1593. if eval $ac_compile; then
  1594.   :
  1595. else
  1596.   rm -rf conftest*
  1597.   
  1598. {
  1599. test -n "$verbose" && \
  1600. echo "    defining TM_IN_SYS_TIME"
  1601. echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
  1602. DEFS="$DEFS -DTM_IN_SYS_TIME=1"
  1603. ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD}
  1604. \${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD}
  1605. \${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD}
  1606. "
  1607. }
  1608.  
  1609. fi
  1610. rm -f conftest*
  1611.  
  1612. ac_decl='#include <sys/types.h>
  1613. '
  1614. case "$DEFS" in
  1615.   *TM_IN_SYS_TIME*) ac_decl="$ac_decl
  1616. #include <sys/time.h>
  1617. " ;;
  1618.   *) ac_decl="$ac_decl
  1619. #include <time.h>
  1620. " ;;
  1621. esac
  1622. test -n "$silent" || echo "checking for tm_zone in struct tm"
  1623. cat > conftest.${ac_ext} <<EOF
  1624. #include "confdefs.h"
  1625. $ac_decl
  1626. int main() { return 0; }
  1627. int t() { struct tm tm; tm.tm_zone;; return 0; }
  1628. EOF
  1629. if eval $ac_compile; then
  1630.   rm -rf conftest*
  1631.   
  1632. {
  1633. test -n "$verbose" && \
  1634. echo "    defining HAVE_TM_ZONE"
  1635. echo "#define" HAVE_TM_ZONE "1" >> confdefs.h
  1636. DEFS="$DEFS -DHAVE_TM_ZONE=1"
  1637. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_ZONE\${ac_dB}HAVE_TM_ZONE\${ac_dC}1\${ac_dD}
  1638. \${ac_uA}HAVE_TM_ZONE\${ac_uB}HAVE_TM_ZONE\${ac_uC}1\${ac_uD}
  1639. \${ac_eA}HAVE_TM_ZONE\${ac_eB}HAVE_TM_ZONE\${ac_eC}1\${ac_eD}
  1640. "
  1641. }
  1642.  
  1643.  
  1644. else
  1645.   rm -rf conftest*
  1646.   ac_no_tm_zone=1
  1647. fi
  1648. rm -f conftest*
  1649.  
  1650. if test -n "$ac_no_tm_zone"; then
  1651. test -n "$silent" || echo "checking for tzname"
  1652. cat > conftest.${ac_ext} <<EOF
  1653. #include "confdefs.h"
  1654. #include <time.h>
  1655. #ifndef tzname /* For SGI.  */
  1656. extern char *tzname[]; /* RS6000 and others want it this way.  */
  1657. #endif
  1658. int main() { return 0; }
  1659. int t() { atoi(*tzname);; return 0; }
  1660. EOF
  1661. if eval $ac_compile; then
  1662.   rm -rf conftest*
  1663.   
  1664. {
  1665. test -n "$verbose" && \
  1666. echo "    defining HAVE_TZNAME"
  1667. echo "#define" HAVE_TZNAME "1" >> confdefs.h
  1668. DEFS="$DEFS -DHAVE_TZNAME=1"
  1669. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TZNAME\${ac_dB}HAVE_TZNAME\${ac_dC}1\${ac_dD}
  1670. \${ac_uA}HAVE_TZNAME\${ac_uB}HAVE_TZNAME\${ac_uC}1\${ac_uD}
  1671. \${ac_eA}HAVE_TZNAME\${ac_eB}HAVE_TZNAME\${ac_eC}1\${ac_eD}
  1672. "
  1673. }
  1674.  
  1675.  
  1676. fi
  1677. rm -f conftest*
  1678.  
  1679. fi
  1680.  
  1681.  
  1682. ac_prog='/* Ultrix mips cc rejects this.  */
  1683. typedef int charset[2]; const charset x;
  1684. /* SunOS 4.1.1 cc rejects this.  */
  1685. char const *const *ccp;
  1686. char **p;
  1687. /* AIX XL C 1.02.0.0 rejects this.
  1688.    It does not let you subtract one const X* pointer from another in an arm
  1689.    of an if-expression whose if-part is not a constant expression */
  1690. const char *g = "string";
  1691. ccp = &g + (g ? g-g : 0);
  1692. /* HPUX 7.0 cc rejects these. */
  1693. ++ccp;
  1694. p = (char**) ccp;
  1695. ccp = (char const *const *) p;
  1696. { /* SCO 3.2v4 cc rejects this.  */
  1697.   char *t;
  1698.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1699.  
  1700.   *t++ = 0;
  1701. }
  1702. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1703.   int x[] = {25,17};
  1704.   const int *foo = &x[0];
  1705.   ++foo;
  1706. }
  1707. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1708.   typedef const int *iptr;
  1709.   iptr p = 0;
  1710.   ++p;
  1711. }
  1712. { /* AIX XL C 1.02.0.0 rejects this saying
  1713.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1714.   struct s { int j; const int *ap[3]; };
  1715.   struct s *b; b->j = 5;
  1716. }
  1717. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1718.   const int foo = 10;
  1719. }'
  1720. test -n "$silent" || echo "checking for lack of working const"
  1721. cat > conftest.${ac_ext} <<EOF
  1722. #include "confdefs.h"
  1723.  
  1724. int main() { return 0; }
  1725. int t() { $ac_prog; return 0; }
  1726. EOF
  1727. if eval $ac_compile; then
  1728.   :
  1729. else
  1730.   rm -rf conftest*
  1731.   
  1732. {
  1733. test -n "$verbose" && \
  1734. echo "    defining" const to be empty
  1735. echo "#define" const "" >> confdefs.h
  1736. DEFS="$DEFS -Dconst="
  1737. ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
  1738. \${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
  1739. \${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
  1740. "
  1741. }
  1742.  
  1743. fi
  1744. rm -f conftest*
  1745.  
  1746.  
  1747. cat > conftestmake <<'EOF'
  1748. all:
  1749.     @echo 'ac_maketemp="${MAKE}"'
  1750. EOF
  1751. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1752. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  1753. if test -n "$ac_maketemp"; then SET_MAKE=
  1754. else SET_MAKE="MAKE=${MAKE-make}"; fi
  1755. rm -f conftestmake
  1756.  
  1757.  
  1758. test -n "$silent" || echo "checking for long file names"
  1759. ac_some_dir_failed=false
  1760. # Test for long file names in all the places we know might matter:
  1761. #      .        the current directory, where building will happen
  1762. #      /tmp        where it might want to write temporary files
  1763. #      /var/tmp        likewise
  1764. #      /usr/tmp        likewise
  1765. #      $prefix/lib    where we will be installing things
  1766. #      $exec_prefix/lib    likewise
  1767. # eval it to expand exec_prefix.
  1768. for ac_dir in `eval echo . /tmp /var/tmp /usr/tmp $prefix/lib $exec_prefix/lib` ; do
  1769.   test -d $ac_dir || continue
  1770.   test -w $ac_dir || continue # It's less confusing to not echo anything here.
  1771.   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
  1772.   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
  1773.   val=`cat $ac_dir/conftest9012345 2>/dev/null`
  1774.   test -f $ac_dir/conftest9012345 && test "$val" = 1 || ac_some_dir_failed=true
  1775.   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2> /dev/null
  1776. done
  1777. $ac_some_dir_failed || 
  1778. {
  1779. test -n "$verbose" && \
  1780. echo "    defining HAVE_LONG_FILE_NAMES"
  1781. echo "#define" HAVE_LONG_FILE_NAMES "1" >> confdefs.h
  1782. DEFS="$DEFS -DHAVE_LONG_FILE_NAMES=1"
  1783. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LONG_FILE_NAMES\${ac_dB}HAVE_LONG_FILE_NAMES\${ac_dC}1\${ac_dD}
  1784. \${ac_uA}HAVE_LONG_FILE_NAMES\${ac_uB}HAVE_LONG_FILE_NAMES\${ac_uC}1\${ac_uD}
  1785. \${ac_eA}HAVE_LONG_FILE_NAMES\${ac_eB}HAVE_LONG_FILE_NAMES\${ac_eC}1\${ac_eD}
  1786. "
  1787. }
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793. #### Choose a window system.
  1794. echo "checking for specified window system"
  1795.  
  1796. window_system=''
  1797. case "${with_x}" in
  1798.   yes )
  1799.     window_system=${window_system}x11
  1800.   ;;
  1801.   no )
  1802.     window_system=${window_system}none
  1803.   ;;
  1804. esac
  1805. case "${window_system}" in
  1806.   .* )
  1807.   ;;
  1808.   * )
  1809.     case "${with_x11}" in
  1810.       yes )
  1811.     window_system=x11
  1812.       ;;
  1813.       no )
  1814.     window_system=none
  1815.       ;;
  1816.     esac
  1817.     case "${with_x10}" in
  1818.       yes )
  1819.     window_system=x10
  1820.       ;;
  1821.       no )
  1822.     window_system=none
  1823.       ;;
  1824.     esac
  1825.   ;;
  1826. esac
  1827.  
  1828. case "${window_system}" in
  1829.   "none" | "x11" | "x10" ) ;;
  1830.   "" )
  1831.     # --x-includes or --x-libraries implies --with-x11.
  1832.     if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
  1833.       window_system=x11
  1834.     else
  1835.       echo "  No window system specified.  Looking for X11."
  1836.       # If the user didn't specify a window system and we found X11, use it.
  1837.       if [ -r /usr/lib/libX11.a \
  1838.      -o -d /usr/include/X11 \
  1839.          -o -d /usr/X386/include \
  1840.      -o -d ${x_includes}/X11 ]; then
  1841.         window_system=x11
  1842.       fi
  1843.     fi
  1844.   ;;
  1845.   * )
  1846.     echo "Don't specify a window system more than once." >&2
  1847.     exit 1
  1848.   ;;
  1849. esac
  1850.  
  1851. case "${window_system}" in
  1852.   "" | "x11" )
  1853.     ### If the user hasn't specified where we should find X, try
  1854.     ### letting autoconf figure that out.
  1855.     if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then
  1856.       
  1857.       # If we find X, set shell vars x_includes and x_libraries to the paths.
  1858. no_x=true
  1859. if test "x$with_x" != xno; then
  1860. test -n "$silent" || echo "checking for X include and library files with xmkmf"
  1861. rm -fr conftestdir
  1862. if mkdir conftestdir; then
  1863.   cd conftestdir
  1864.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1865.   cat > Imakefile <<'EOF'
  1866. acfindx:
  1867.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1868. EOF
  1869.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1870.     no_x=
  1871.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1872.     eval `make acfindx 2>/dev/null | grep -v make`
  1873.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1874.     if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a
  1875.     then
  1876.       ac_im_usrlibdir=$ac_im_libdir
  1877.     fi
  1878.     case "$ac_im_incroot" in
  1879.     /usr/include) ;;
  1880.     *) test -z "$x_includes" && x_includes="$ac_im_incroot" ;;
  1881.     esac
  1882.     case "$ac_im_usrlibdir" in
  1883.     /usr/lib | /lib) ;;
  1884.     *) test -z "$x_libraries" && x_libraries="$ac_im_usrlibdir" ;;
  1885.     esac
  1886.   fi
  1887.   cd ..
  1888.   rm -fr conftestdir
  1889. fi
  1890.  
  1891. if test -z "$ac_im_usrlibdir"; then
  1892. test -n "$silent" || echo "checking for X include and library files directly"
  1893. if test ".$x_direct_test_library" = . ; then
  1894.    x_direct_test_library='Xt'
  1895. fi
  1896. if test ".$x_direct_test_include" = . ; then
  1897.    x_direct_test_include='X11/Intrinsic.h'
  1898. fi
  1899. cat > conftest.${ac_ext} <<EOF
  1900. #include "confdefs.h"
  1901. #include <$x_direct_test_include>
  1902. EOF
  1903. # Some shells (Coherent) do redirections in the wrong order, so need
  1904. # the parens.
  1905. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1906. if test -z "$ac_err"; then
  1907.   rm -rf conftest*
  1908.   no_x=
  1909.  
  1910. else
  1911.   rm -rf conftest*
  1912.   for ac_dir in               \
  1913.     /usr/X11R6/include        \
  1914.     /usr/X11R5/include        \
  1915.     /usr/X11R4/include        \
  1916.                               \
  1917.     /usr/include/X11R6        \
  1918.     /usr/include/X11R5        \
  1919.     /usr/include/X11R4        \
  1920.                               \
  1921.     /usr/local/X11R6/include  \
  1922.     /usr/local/X11R5/include  \
  1923.     /usr/local/X11R4/include  \
  1924.                               \
  1925.     /usr/local/include/X11R6  \
  1926.     /usr/local/include/X11R5  \
  1927.     /usr/local/include/X11R4  \
  1928.                               \
  1929.     /usr/X11/include          \
  1930.     /usr/include/X11          \
  1931.     /usr/local/X11/include    \
  1932.     /usr/local/include/X11    \
  1933.                               \
  1934.     /usr/X386/include         \
  1935.     /usr/x386/include         \
  1936.     /usr/XFree86/include/X11  \
  1937.                               \
  1938.     /usr/include              \
  1939.     /usr/local/include        \
  1940.     /usr/unsupported/include  \
  1941.     /usr/athena/include       \
  1942.     /usr/local/x11r5/include  \
  1943.     /usr/lpp/Xamples/include  \
  1944.                               \
  1945.     /usr/openwin/include      \
  1946.     /usr/openwin/share/include \
  1947.     ; \
  1948.   do
  1949.     if test -r "$ac_dir/$x_direct_test_include"; then
  1950.       test -z "$x_includes" && x_includes=$ac_dir
  1951.       no_x=
  1952.       break
  1953.     fi
  1954.   done
  1955. fi
  1956. rm -f conftest*
  1957.  
  1958. # Check for the libraries.  First see if replacing the `include' by
  1959. # `lib' works.
  1960. ac_save_LIBS="${LIBS}"
  1961. LIBS="${LIBS} -l"$x_direct_test_library""
  1962. ac_have_lib=""
  1963. test -n "$silent" || echo "checking for -l"$x_direct_test_library""
  1964. cat > conftest.${ac_ext} <<EOF
  1965. #include "confdefs.h"
  1966.  
  1967. int main() { return 0; }
  1968. int t() { main();; return 0; }
  1969. EOF
  1970. if eval $ac_compile; then
  1971.   rm -rf conftest*
  1972.   ac_have_lib="1"
  1973.  
  1974. fi
  1975. rm -f conftest*
  1976. LIBS="${ac_save_LIBS}"
  1977. if test -n "${ac_have_lib}"; then
  1978.    :; no_x=
  1979. else
  1980.    :; for ac_dir in `echo "$x_includes" | sed s/include/lib/` \
  1981.     /usr/X11R6/lib        \
  1982.     /usr/X11R5/lib        \
  1983.     /usr/X11R4/lib        \
  1984.                           \
  1985.     /usr/lib/X11R6        \
  1986.     /usr/lib/X11R5        \
  1987.     /usr/lib/X11R4        \
  1988.                           \
  1989.     /usr/local/X11R6/lib  \
  1990.     /usr/local/X11R5/lib  \
  1991.     /usr/local/X11R4/lib  \
  1992.                           \
  1993.     /usr/local/lib/X11R6  \
  1994.     /usr/local/lib/X11R5  \
  1995.     /usr/local/lib/X11R4  \
  1996.                           \
  1997.     /usr/X11/lib          \
  1998.     /usr/lib/X11          \
  1999.     /usr/local/X11/lib    \
  2000.     /usr/local/lib/X11    \
  2001.                           \
  2002.     /usr/X386/lib         \
  2003.     /usr/x386/lib         \
  2004.     /usr/XFree86/lib/X11  \
  2005.                           \
  2006.     /usr/lib              \
  2007.     /usr/local/lib        \
  2008.     /usr/unsupported/lib  \
  2009.     /usr/athena/lib       \
  2010.     /usr/local/x11r5/lib  \
  2011.     /usr/lpp/Xamples/lib  \
  2012.                           \
  2013.     /usr/openwin/lib      \
  2014.     /usr/openwin/share/lib \
  2015.     ; \
  2016. do
  2017.   for ac_extension in a so sl; do
  2018.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  2019.       test -z "$x_libraries" && x_libraries=$ac_dir
  2020.       no_x=
  2021.       break 2
  2022.     fi
  2023.   done
  2024. done
  2025. fi
  2026.  
  2027. fi
  2028. test -n "$x_includes" && test -n "$verbose" && echo "    X11 headers are in $x_includes"
  2029. test -n "$x_libraries" && test -n "$verbose" && echo "    X11 libraries are in $x_libraries"
  2030. fi
  2031.  
  2032.       
  2033.     fi
  2034.     if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
  2035.       window_system=x11
  2036.     fi
  2037.   ;;
  2038. esac
  2039.  
  2040. [ -z "${window_system}" ] && window_system=none
  2041.  
  2042. [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
  2043. [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE_AUX="-R${x_libraries}"
  2044. [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
  2045.  
  2046. # Avoid forcing the search of /usr/include before fixed include files.
  2047. if [ "$C_SWITCH_X_SITE" = "-I/usr/include" ]; then
  2048.    C_SWITCH_X_SITE=" "
  2049. fi
  2050.  
  2051. case "${window_system}" in
  2052.   x11 )
  2053.     HAVE_X_WINDOWS=yes
  2054.     HAVE_X11=yes
  2055.     echo "  Using X11."
  2056.     case "${with_x_toolkit}" in
  2057.       athena | lucid )
  2058.     USE_X_TOOLKIT=LUCID
  2059.     echo "  Using Xt toolkit."
  2060.     ;;    
  2061.       motif )
  2062.     USE_X_TOOLKIT=MOTIF
  2063.     echo "  Using Motif toolkit."
  2064.     ;;    
  2065.       open-look )
  2066.     USE_X_TOOLKIT=OPEN_LOOK
  2067.     echo "  Using Open-Look toolkit."
  2068.     ;;    
  2069.       * )
  2070.     USE_X_TOOLKIT=none
  2071.     echo "  Using Xlib directly."
  2072.       ;;
  2073.     esac
  2074.   ;;
  2075.   x10 )
  2076.     HAVE_X_WINDOWS=yes
  2077.     HAVE_X11=no
  2078.     USE_X_TOOLKIT=none
  2079.     echo "  Using X10."
  2080.   ;;
  2081.   none )
  2082.     HAVE_X_WINDOWS=no
  2083.     HAVE_X11=no
  2084.     USE_X_TOOLKIT=none
  2085.     echo "  Using no window system."
  2086.   ;;
  2087. esac
  2088. X_TOOLKIT_TYPE=$USE_X_TOOLKIT
  2089.  
  2090. ### If we're using X11, we should use the X menu package.
  2091. HAVE_X_MENU=no
  2092. case ${HAVE_X11} in
  2093.   yes )
  2094.     HAVE_X_MENU=yes
  2095.   ;;
  2096. esac
  2097.  
  2098. #### Extract some information from the operating system and machine files.
  2099.  
  2100. echo "examining the machine- and system-dependent files to find out"
  2101. echo " - which libraries the lib-src programs will want, and"
  2102. echo " - whether the GNU malloc routines are usable"
  2103.  
  2104. ### First figure out CFLAGS (which we use for running the compiler here)
  2105. ### and REAL_CFLAGS (which we use for real compilation).
  2106. ### The two are the same except on a few systems, where they are made
  2107. ### different to work around various lossages.  For example,
  2108. ### GCC 2.5 on Linux needs them to be different because it treats -g
  2109. ### as implying static linking.
  2110.  
  2111. ### If the CFLAGS env var is specified, we use that value
  2112. ### instead of the default.
  2113.  
  2114. ### It's not important that this name contain the PID; you can't run
  2115. ### two configures in the same directory and have anything work
  2116. ### anyway.
  2117. tempcname="conftest.c"
  2118.  
  2119. echo '
  2120. #include "'${srcdir}'/src/'${opsysfile}'"
  2121. #include "'${srcdir}'/src/'${machfile}'"
  2122. #ifndef LIBS_MACHINE
  2123. #define LIBS_MACHINE
  2124. #endif
  2125. #ifndef LIBS_SYSTEM
  2126. #define LIBS_SYSTEM
  2127. #endif
  2128. #ifndef C_SWITCH_SYSTEM
  2129. #define C_SWITCH_SYSTEM
  2130. #endif
  2131. #ifndef C_SWITCH_MACHINE
  2132. #define C_SWITCH_MACHINE
  2133. #endif
  2134. configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
  2135. configure___ c_switch_system=C_SWITCH_SYSTEM
  2136. configure___ c_switch_machine=C_SWITCH_MACHINE
  2137.  
  2138. #ifndef LIB_X11_LIB
  2139. #define LIB_X11_LIB -lX11
  2140. #endif
  2141.  
  2142. #ifndef LIBX11_MACHINE
  2143. #define LIBX11_MACHINE
  2144. #endif
  2145.  
  2146. #ifndef LIBX11_SYSTEM
  2147. #define LIBX11_SYSTEM
  2148. #endif
  2149. configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
  2150.  
  2151. #ifdef UNEXEC
  2152. configure___ unexec=UNEXEC
  2153. #else
  2154. configure___ unexec=unexec.o
  2155. #endif
  2156.  
  2157. #ifdef SYSTEM_MALLOC
  2158. configure___ system_malloc=yes
  2159. #else
  2160. configure___ system_malloc=no
  2161. #endif
  2162.  
  2163. #ifndef C_DEBUG_SWITCH
  2164. #define C_DEBUG_SWITCH -g
  2165. #endif
  2166.  
  2167. #ifndef C_OPTIMIZE_SWITCH
  2168. #define C_OPTIMIZE_SWITCH -O
  2169. #endif
  2170.  
  2171. #ifdef THIS_IS_CONFIGURE
  2172.  
  2173. /* Get the CFLAGS for tests in configure.  */
  2174. #ifdef __GNUC__
  2175. configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${CFLAGS}'
  2176. #else
  2177. configure___ CFLAGS=C_DEBUG_SWITCH '${CFLAGS}'
  2178. #endif
  2179.  
  2180. #else /* not THIS_IS_CONFIGURE */
  2181.  
  2182. /* Get the CFLAGS for real compilation.  */
  2183. #ifdef __GNUC__
  2184. configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${CFLAGS}'
  2185. #else
  2186. configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${CFLAGS}'
  2187. #endif
  2188.  
  2189. #endif /* not THIS_IS_CONFIGURE */
  2190. ' > ${tempcname}
  2191. # The value of CPP is a quoted variable reference, so we need to do this
  2192. # to get its actual value...
  2193. CPP=`eval "echo $CPP"`
  2194. eval `${CPP} -Isrc ${tempcname} \
  2195.        | grep 'configure___' \
  2196.        | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
  2197. if [ "x$CFLAGS" = x ]; then
  2198.   eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
  2199.      | grep 'configure___' \
  2200.      | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
  2201. else
  2202.   REAL_CFLAGS="$CFLAGS"
  2203. fi
  2204. rm ${tempcname}
  2205.  
  2206. ### Compute the unexec source name from the object name.
  2207. UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
  2208.  
  2209. # Do the opsystem or machine files prohibit the use of the GNU malloc?
  2210. # Assume not, until told otherwise.
  2211. GNU_MALLOC=yes
  2212. if [ "${system_malloc}" = "yes" ]; then
  2213.   GNU_MALLOC=no
  2214.   GNU_MALLOC_reason="
  2215.   (The GNU allocators don't work with this system configuration.)"
  2216. fi
  2217.  
  2218. if [ x"${REL_ALLOC}" = x ]; then
  2219.   REL_ALLOC=${GNU_MALLOC}
  2220. fi
  2221.  
  2222. LISP_FLOAT_TYPE=yes
  2223.  
  2224.  
  2225. #### Add the libraries to LIBS and check for some functions.
  2226.  
  2227.  
  2228. DEFS="$c_switch_system $c_switch_machine $DEFS"
  2229. LIBS="$libsrc_libs"
  2230.  
  2231. ac_save_LIBS="${LIBS}"
  2232. LIBS="${LIBS} -ldnet"
  2233. ac_have_lib=""
  2234. test -n "$silent" || echo "checking for -ldnet"
  2235. cat > conftest.${ac_ext} <<EOF
  2236. #include "confdefs.h"
  2237.  
  2238. int main() { return 0; }
  2239. int t() { main();; return 0; }
  2240. EOF
  2241. if eval $ac_compile; then
  2242.   rm -rf conftest*
  2243.   ac_have_lib="1"
  2244.  
  2245. fi
  2246. rm -f conftest*
  2247. LIBS="${ac_save_LIBS}"
  2248. if test -n "${ac_have_lib}"; then
  2249.    
  2250. {
  2251. test -n "$verbose" && \
  2252. echo "    defining HAVE_LIBDNET"
  2253. echo "#define" HAVE_LIBDNET "1" >> confdefs.h
  2254. DEFS="$DEFS -DHAVE_LIBDNET=1"
  2255. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBDNET\${ac_dB}HAVE_LIBDNET\${ac_dC}1\${ac_dD}
  2256. \${ac_uA}HAVE_LIBDNET\${ac_uB}HAVE_LIBDNET\${ac_uC}1\${ac_uD}
  2257. \${ac_eA}HAVE_LIBDNET\${ac_eB}HAVE_LIBDNET\${ac_eC}1\${ac_eD}
  2258. "
  2259. }
  2260.  
  2261.    LIBS="${LIBS} -ldnet"
  2262. fi
  2263.  
  2264.  
  2265. ac_save_LIBS="${LIBS}"
  2266. LIBS="${LIBS} -lXbsd"
  2267. ac_have_lib=""
  2268. test -n "$silent" || echo "checking for -lXbsd"
  2269. cat > conftest.${ac_ext} <<EOF
  2270. #include "confdefs.h"
  2271.  
  2272. int main() { return 0; }
  2273. int t() { main();; return 0; }
  2274. EOF
  2275. if eval $ac_compile; then
  2276.   rm -rf conftest*
  2277.   ac_have_lib="1"
  2278.  
  2279. fi
  2280. rm -f conftest*
  2281. LIBS="${ac_save_LIBS}"
  2282. if test -n "${ac_have_lib}"; then
  2283.    :; LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
  2284. else
  2285.    :; 
  2286. fi
  2287.  
  2288.  
  2289. echo checking for XFree86
  2290. if test -d /usr/X386/include; then
  2291.   HAVE_XFREE386=yes
  2292.   test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
  2293. fi
  2294.  
  2295. # We change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
  2296. # for the tests that follow.
  2297.  
  2298. if test "${HAVE_X11}" = "yes"; then
  2299.   DEFS="$C_SWITCH_X_SITE $DEFS"
  2300.   LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
  2301.   CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
  2302.   for ac_func in XrmSetDatabase XScreenResourceString \
  2303. XScreenNumberOfScreen XSetWMProtocols
  2304. do
  2305. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2306. test -n "$silent" || echo "checking for ${ac_func}"
  2307. cat > conftest.${ac_ext} <<EOF
  2308. #include "confdefs.h"
  2309. #include <ctype.h>
  2310. int main() { return 0; }
  2311. int t() { 
  2312. /* The GNU C library defines this for functions which it implements
  2313.     to always fail with ENOSYS.  Some functions are actually named
  2314.     something starting with __ and the normal name is an alias.  */
  2315. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  2316. choke me
  2317. #else
  2318. /* Override any gcc2 internal prototype to avoid an error.  */
  2319. extern char ${ac_func}(); ${ac_func}();
  2320. #endif
  2321. ; return 0; }
  2322. EOF
  2323. if eval $ac_compile; then
  2324.   rm -rf conftest*
  2325.   {
  2326. test -n "$verbose" && \
  2327. echo "    defining ${ac_tr_func}"
  2328. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  2329. DEFS="$DEFS -D${ac_tr_func}=1"
  2330. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  2331. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  2332. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  2333. "
  2334. }
  2335.  
  2336.  
  2337. fi
  2338. rm -f conftest*
  2339. done
  2340.  
  2341. fi
  2342.  
  2343. if test "${HAVE_X11}" = "yes"; then
  2344.   test -n "$silent" || echo "checking for X11 version"
  2345. cat > conftest.${ac_ext} <<EOF
  2346. #include "confdefs.h"
  2347. #include <X11/Xlib.h>
  2348. int main() { return 0; }
  2349. int t() { 
  2350. #if XlibSpecificationRelease < 6
  2351. fail;
  2352. #endif
  2353. ; return 0; }
  2354. EOF
  2355. if eval $ac_compile; then
  2356.   rm -rf conftest*
  2357.   
  2358. {
  2359. test -n "$verbose" && \
  2360. echo "    defining HAVE_X11R6"
  2361. echo "#define" HAVE_X11R6 "1" >> confdefs.h
  2362. DEFS="$DEFS -DHAVE_X11R6=1"
  2363. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_X11R6\${ac_dB}HAVE_X11R6\${ac_dC}1\${ac_dD}
  2364. \${ac_uA}HAVE_X11R6\${ac_uB}HAVE_X11R6\${ac_uC}1\${ac_uD}
  2365. \${ac_eA}HAVE_X11R6\${ac_eB}HAVE_X11R6\${ac_eC}1\${ac_eD}
  2366. "
  2367. }
  2368.  
  2369.  
  2370. fi
  2371. rm -f conftest*
  2372.  
  2373. fi
  2374.  
  2375. if test "${USE_X_TOOLKIT}" != "none"; then
  2376.   test -n "$silent" || echo "checking for X11 toolkit version"
  2377. cat > conftest.${ac_ext} <<EOF
  2378. #include "confdefs.h"
  2379. #include <X11/Intrinsic.h>
  2380. int main() { return 0; }
  2381. int t() { 
  2382. #if XtSpecificationRelease < 6
  2383. fail;
  2384. #endif
  2385. ; return 0; }
  2386. EOF
  2387. if eval $ac_compile; then
  2388.   rm -rf conftest*
  2389.   
  2390. {
  2391. test -n "$verbose" && \
  2392. echo "    defining HAVE_X11XTR6"
  2393. echo "#define" HAVE_X11XTR6 "1" >> confdefs.h
  2394. DEFS="$DEFS -DHAVE_X11XTR6=1"
  2395. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_X11XTR6\${ac_dB}HAVE_X11XTR6\${ac_dC}1\${ac_dD}
  2396. \${ac_uA}HAVE_X11XTR6\${ac_uB}HAVE_X11XTR6\${ac_uC}1\${ac_uD}
  2397. \${ac_eA}HAVE_X11XTR6\${ac_eB}HAVE_X11XTR6\${ac_eC}1\${ac_eD}
  2398. "
  2399. }
  2400.  
  2401.  
  2402. fi
  2403. rm -f conftest*
  2404.  
  2405. fi
  2406.  
  2407. # If netdb.h doesn't declare h_errno, we must declare it by hand.
  2408. test -n "$silent" || echo "checking for declaration of h_errno in netdb.h"
  2409. cat > conftest.${ac_ext} <<EOF
  2410. #include "confdefs.h"
  2411. #include <netdb.h>
  2412. int main() { return 0; }
  2413. int t() { 
  2414. int
  2415. foo ()
  2416. {
  2417.   return h_errno;
  2418. }
  2419. ; return 0; }
  2420. EOF
  2421. if eval $ac_compile; then
  2422.   rm -rf conftest*
  2423.   
  2424. {
  2425. test -n "$verbose" && \
  2426. echo "    defining HAVE_H_ERRNO"
  2427. echo "#define" HAVE_H_ERRNO "1" >> confdefs.h
  2428. DEFS="$DEFS -DHAVE_H_ERRNO=1"
  2429. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_H_ERRNO\${ac_dB}HAVE_H_ERRNO\${ac_dC}1\${ac_dD}
  2430. \${ac_uA}HAVE_H_ERRNO\${ac_uB}HAVE_H_ERRNO\${ac_uC}1\${ac_uD}
  2431. \${ac_eA}HAVE_H_ERRNO\${ac_eB}HAVE_H_ERRNO\${ac_eC}1\${ac_eD}
  2432. "
  2433. }
  2434.  
  2435.  
  2436. fi
  2437. rm -f conftest*
  2438.  
  2439.  
  2440. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  2441. # for constant arguments.  Useless!
  2442. test -n "$silent" || echo "checking for working alloca.h"
  2443. cat > conftest.${ac_ext} <<EOF
  2444. #include "confdefs.h"
  2445. #include <alloca.h>
  2446. int main() { return 0; }
  2447. int t() { char *p = alloca(2 * sizeof(int));; return 0; }
  2448. EOF
  2449. if eval $ac_compile; then
  2450.   rm -rf conftest*
  2451.   
  2452. {
  2453. test -n "$verbose" && \
  2454. echo "    defining HAVE_ALLOCA_H"
  2455. echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
  2456. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  2457. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD}
  2458. \${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD}
  2459. \${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD}
  2460. "
  2461. }
  2462.  
  2463.  
  2464. fi
  2465. rm -f conftest*
  2466.  
  2467. ac_decl="#ifdef __GNUC__
  2468. #define alloca __builtin_alloca
  2469. #else
  2470. #if HAVE_ALLOCA_H
  2471. #include <alloca.h>
  2472. #else
  2473. #ifdef _AIX
  2474.  #pragma alloca
  2475. #else
  2476. char *alloca ();
  2477. #endif
  2478. #endif
  2479. #endif
  2480. "
  2481. test -n "$silent" || echo "checking for alloca"
  2482. cat > conftest.${ac_ext} <<EOF
  2483. #include "confdefs.h"
  2484. $ac_decl
  2485. int main() { return 0; }
  2486. int t() { char *p = (char *) alloca(1);; return 0; }
  2487. EOF
  2488. if eval $ac_compile; then
  2489.   rm -rf conftest*
  2490.   
  2491. {
  2492. test -n "$verbose" && \
  2493. echo "    defining HAVE_ALLOCA"
  2494. echo "#define" HAVE_ALLOCA "1" >> confdefs.h
  2495. DEFS="$DEFS -DHAVE_ALLOCA=1"
  2496. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD}
  2497. \${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD}
  2498. \${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD}
  2499. "
  2500. }
  2501.  
  2502.  
  2503. else
  2504.   rm -rf conftest*
  2505.   ac_alloca_missing=1
  2506. cat > conftest.${ac_ext} <<EOF
  2507. #include "confdefs.h"
  2508.  
  2509. #if defined(CRAY) && ! defined(CRAY2)
  2510. winnitude
  2511. #else
  2512. lossage
  2513. #endif
  2514.  
  2515. EOF
  2516. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  2517. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  2518.   rm -rf conftest*
  2519.   test -n "$silent" || echo "checking for _getb67"
  2520. cat > conftest.${ac_ext} <<EOF
  2521. #include "confdefs.h"
  2522. #include <ctype.h>
  2523. int main() { return 0; }
  2524. int t() { 
  2525. /* The GNU C library defines this for functions which it implements
  2526.     to always fail with ENOSYS.  Some functions are actually named
  2527.     something starting with __ and the normal name is an alias.  */
  2528. #if defined (__stub__getb67) || defined (__stub____getb67)
  2529. choke me
  2530. #else
  2531. /* Override any gcc2 internal prototype to avoid an error.  */
  2532. extern char _getb67(); _getb67();
  2533. #endif
  2534. ; return 0; }
  2535. EOF
  2536. if eval $ac_compile; then
  2537.   rm -rf conftest*
  2538.   {
  2539. test -n "$verbose" && \
  2540. echo "    defining" CRAY_STACKSEG_END to be "_getb67"
  2541. echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
  2542. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  2543. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD}
  2544. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD}
  2545. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD}
  2546. "
  2547. }
  2548.  
  2549.  
  2550. else
  2551.   rm -rf conftest*
  2552.   test -n "$silent" || echo "checking for GETB67"
  2553. cat > conftest.${ac_ext} <<EOF
  2554. #include "confdefs.h"
  2555. #include <ctype.h>
  2556. int main() { return 0; }
  2557. int t() { 
  2558. /* The GNU C library defines this for functions which it implements
  2559.     to always fail with ENOSYS.  Some functions are actually named
  2560.     something starting with __ and the normal name is an alias.  */
  2561. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  2562. choke me
  2563. #else
  2564. /* Override any gcc2 internal prototype to avoid an error.  */
  2565. extern char GETB67(); GETB67();
  2566. #endif
  2567. ; return 0; }
  2568. EOF
  2569. if eval $ac_compile; then
  2570.   rm -rf conftest*
  2571.   {
  2572. test -n "$verbose" && \
  2573. echo "    defining" CRAY_STACKSEG_END to be "GETB67"
  2574. echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
  2575. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  2576. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD}
  2577. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD}
  2578. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD}
  2579. "
  2580. }
  2581.  
  2582.  
  2583. else
  2584.   rm -rf conftest*
  2585.   test -n "$silent" || echo "checking for getb67"
  2586. cat > conftest.${ac_ext} <<EOF
  2587. #include "confdefs.h"
  2588. #include <ctype.h>
  2589. int main() { return 0; }
  2590. int t() { 
  2591. /* The GNU C library defines this for functions which it implements
  2592.     to always fail with ENOSYS.  Some functions are actually named
  2593.     something starting with __ and the normal name is an alias.  */
  2594. #if defined (__stub_getb67) || defined (__stub___getb67)
  2595. choke me
  2596. #else
  2597. /* Override any gcc2 internal prototype to avoid an error.  */
  2598. extern char getb67(); getb67();
  2599. #endif
  2600. ; return 0; }
  2601. EOF
  2602. if eval $ac_compile; then
  2603.   rm -rf conftest*
  2604.   {
  2605. test -n "$verbose" && \
  2606. echo "    defining" CRAY_STACKSEG_END to be "getb67"
  2607. echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
  2608. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  2609. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD}
  2610. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD}
  2611. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD}
  2612. "
  2613. }
  2614.  
  2615.  
  2616. fi
  2617. rm -f conftest*
  2618.  
  2619. fi
  2620. rm -f conftest*
  2621.  
  2622. fi
  2623. rm -f conftest*
  2624.  
  2625.  
  2626. fi
  2627. rm -f conftest*
  2628.  
  2629.  
  2630. fi
  2631. rm -f conftest*
  2632.  
  2633. if test -n "$ac_alloca_missing"; then
  2634.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  2635.   # that cause trouble.  Some versions do not even contain alloca or
  2636.   # contain a buggy version.  If you still want to use their alloca,
  2637.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  2638.   ALLOCA=alloca.o
  2639.   
  2640. {
  2641. test -n "$verbose" && \
  2642. echo "    defining C_ALLOCA"
  2643. echo "#define" C_ALLOCA "1" >> confdefs.h
  2644. DEFS="$DEFS -DC_ALLOCA=1"
  2645. ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD}
  2646. \${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD}
  2647. \${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD}
  2648. "
  2649. }
  2650.  
  2651.  
  2652.   test -n "$silent" || echo "checking stack direction for C alloca"
  2653.   test -n "$silent" || echo "checking whether cross-compiling"
  2654. # If we cannot run a trivial program, we must be cross compiling.
  2655. cat > conftest.${ac_ext} <<EOF
  2656. #include "confdefs.h"
  2657. main(){exit(0);}
  2658. EOF
  2659. eval $ac_compile
  2660. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2661.   :
  2662. else
  2663.   cross_compiling=1
  2664. fi
  2665. rm -fr conftest*
  2666.  
  2667. if test -n "$cross_compiling"
  2668. then
  2669.   
  2670. {
  2671. test -n "$verbose" && \
  2672. echo "    defining" STACK_DIRECTION to be "0"
  2673. echo "#define" STACK_DIRECTION "0" >> confdefs.h
  2674. DEFS="$DEFS -DSTACK_DIRECTION=0"
  2675. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD}
  2676. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD}
  2677. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD}
  2678. "
  2679. }
  2680.  
  2681. else
  2682. cat > conftest.${ac_ext} <<EOF
  2683. #include "confdefs.h"
  2684. find_stack_direction ()
  2685. {
  2686.   static char *addr = 0;
  2687.   auto char dummy;
  2688.   if (addr == 0)
  2689.     {
  2690.       addr = &dummy;
  2691.       return find_stack_direction ();
  2692.     }
  2693.   else
  2694.     return (&dummy > addr) ? 1 : -1;
  2695. }
  2696. main ()
  2697. {
  2698.   exit (find_stack_direction() < 0);
  2699. }
  2700. EOF
  2701. eval $ac_compile
  2702. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2703.   
  2704. {
  2705. test -n "$verbose" && \
  2706. echo "    defining" STACK_DIRECTION to be "1"
  2707. echo "#define" STACK_DIRECTION "1" >> confdefs.h
  2708. DEFS="$DEFS -DSTACK_DIRECTION=1"
  2709. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD}
  2710. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD}
  2711. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD}
  2712. "
  2713. }
  2714.  
  2715.  
  2716. else
  2717.   
  2718. {
  2719. test -n "$verbose" && \
  2720. echo "    defining" STACK_DIRECTION to be "-1"
  2721. echo "#define" STACK_DIRECTION "-1" >> confdefs.h
  2722. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  2723. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD}
  2724. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD}
  2725. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD}
  2726. "
  2727. }
  2728.  
  2729. fi
  2730. fi
  2731. rm -fr conftest*
  2732. fi
  2733.  
  2734.  
  2735. # logb and frexp are found in -lm on most systems.
  2736. ac_save_LIBS="${LIBS}"
  2737. LIBS="${LIBS} -lm"
  2738. ac_have_lib=""
  2739. test -n "$silent" || echo "checking for -lm"
  2740. cat > conftest.${ac_ext} <<EOF
  2741. #include "confdefs.h"
  2742.  
  2743. int main() { return 0; }
  2744. int t() { main();; return 0; }
  2745. EOF
  2746. if eval $ac_compile; then
  2747.   rm -rf conftest*
  2748.   ac_have_lib="1"
  2749.  
  2750. fi
  2751. rm -f conftest*
  2752. LIBS="${ac_save_LIBS}"
  2753. if test -n "${ac_have_lib}"; then
  2754.    
  2755. {
  2756. test -n "$verbose" && \
  2757. echo "    defining HAVE_LIBM"
  2758. echo "#define" HAVE_LIBM "1" >> confdefs.h
  2759. DEFS="$DEFS -DHAVE_LIBM=1"
  2760. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBM\${ac_dB}HAVE_LIBM\${ac_dC}1\${ac_dD}
  2761. \${ac_uA}HAVE_LIBM\${ac_uB}HAVE_LIBM\${ac_uC}1\${ac_uD}
  2762. \${ac_eA}HAVE_LIBM\${ac_eB}HAVE_LIBM\${ac_eC}1\${ac_eD}
  2763. "
  2764. }
  2765.  
  2766.    LIBS="${LIBS} -lm"
  2767. fi
  2768.  
  2769. for ac_func in gettimeofday gethostname dup2 rename closedir mkdir rmdir \
  2770. random lrand48 bcopy bcmp logb frexp fmod drem ftime res_init setsid \
  2771. strerror fpathconf
  2772. do
  2773. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2774. test -n "$silent" || echo "checking for ${ac_func}"
  2775. cat > conftest.${ac_ext} <<EOF
  2776. #include "confdefs.h"
  2777. #include <ctype.h>
  2778. int main() { return 0; }
  2779. int t() { 
  2780. /* The GNU C library defines this for functions which it implements
  2781.     to always fail with ENOSYS.  Some functions are actually named
  2782.     something starting with __ and the normal name is an alias.  */
  2783. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  2784. choke me
  2785. #else
  2786. /* Override any gcc2 internal prototype to avoid an error.  */
  2787. extern char ${ac_func}(); ${ac_func}();
  2788. #endif
  2789. ; return 0; }
  2790. EOF
  2791. if eval $ac_compile; then
  2792.   rm -rf conftest*
  2793.   {
  2794. test -n "$verbose" && \
  2795. echo "    defining ${ac_tr_func}"
  2796. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  2797. DEFS="$DEFS -D${ac_tr_func}=1"
  2798. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  2799. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  2800. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  2801. "
  2802. }
  2803.  
  2804.  
  2805. fi
  2806. rm -f conftest*
  2807. done
  2808.  
  2809.  
  2810. ok_so_far=true
  2811. test -n "$silent" || echo "checking for socket"
  2812. cat > conftest.${ac_ext} <<EOF
  2813. #include "confdefs.h"
  2814. #include <ctype.h>
  2815. int main() { return 0; }
  2816. int t() { 
  2817. /* The GNU C library defines this for functions which it implements
  2818.     to always fail with ENOSYS.  Some functions are actually named
  2819.     something starting with __ and the normal name is an alias.  */
  2820. #if defined (__stub_socket) || defined (__stub___socket)
  2821. choke me
  2822. #else
  2823. /* Override any gcc2 internal prototype to avoid an error.  */
  2824. extern char socket(); socket();
  2825. #endif
  2826. ; return 0; }
  2827. EOF
  2828. if eval $ac_compile; then
  2829.   :
  2830. else
  2831.   rm -rf conftest*
  2832.   ok_so_far=
  2833. fi
  2834. rm -f conftest*
  2835.  
  2836. if test -n "$ok_so_far"; then
  2837.   test -n "$silent" || echo "checking for netinet/in.h"
  2838. cat > conftest.${ac_ext} <<EOF
  2839. #include "confdefs.h"
  2840. #include <netinet/in.h>
  2841. EOF
  2842. # Some shells (Coherent) do redirections in the wrong order, so need
  2843. # the parens.
  2844. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  2845. if test -z "$ac_err"; then
  2846.   :
  2847. else
  2848.   rm -rf conftest*
  2849.   ok_so_far=
  2850. fi
  2851. rm -f conftest*
  2852.  
  2853. fi
  2854. if test -n "$ok_so_far"; then
  2855.   test -n "$silent" || echo "checking for arpa/inet.h"
  2856. cat > conftest.${ac_ext} <<EOF
  2857. #include "confdefs.h"
  2858. #include <arpa/inet.h>
  2859. EOF
  2860. # Some shells (Coherent) do redirections in the wrong order, so need
  2861. # the parens.
  2862. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  2863. if test -z "$ac_err"; then
  2864.   :
  2865. else
  2866.   rm -rf conftest*
  2867.   ok_so_far=
  2868. fi
  2869. rm -f conftest*
  2870.  
  2871. fi
  2872. if test -n "$ok_so_far"; then
  2873.   
  2874. {
  2875. test -n "$verbose" && \
  2876. echo "    defining HAVE_INET_SOCKETS"
  2877. echo "#define" HAVE_INET_SOCKETS "1" >> confdefs.h
  2878. DEFS="$DEFS -DHAVE_INET_SOCKETS=1"
  2879. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_INET_SOCKETS\${ac_dB}HAVE_INET_SOCKETS\${ac_dC}1\${ac_dD}
  2880. \${ac_uA}HAVE_INET_SOCKETS\${ac_uB}HAVE_INET_SOCKETS\${ac_uC}1\${ac_uD}
  2881. \${ac_eA}HAVE_INET_SOCKETS\${ac_eB}HAVE_INET_SOCKETS\${ac_eC}1\${ac_eD}
  2882. "
  2883. }
  2884.  
  2885. fi
  2886.  
  2887. # Set up the CFLAGS for real compilation, so we can substitute it.
  2888. CFLAGS="$REAL_CFLAGS"
  2889.  
  2890.  
  2891. #### Find out which version of Emacs this is.
  2892. version=`grep 'defconst[     ]*emacs-version' ${srcdir}/lisp/version.el \
  2893.      | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
  2894. if [ x"${version}" = x ]; then
  2895.   echo "${progname}: can't find current emacs version in
  2896.     \`${srcdir}/lisp/version.el'." >&2
  2897.   exit 1
  2898. fi
  2899.  
  2900. if [ -f /usr/lpp/X11/bin/smt.exp ]; then
  2901.   
  2902.   
  2903. {
  2904. test -n "$verbose" && \
  2905. echo "    defining HAVE_AIX_SMT_EXP"
  2906. echo "#define" HAVE_AIX_SMT_EXP "1" >> confdefs.h
  2907. DEFS="$DEFS -DHAVE_AIX_SMT_EXP=1"
  2908. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_AIX_SMT_EXP\${ac_dB}HAVE_AIX_SMT_EXP\${ac_dC}1\${ac_dD}
  2909. \${ac_uA}HAVE_AIX_SMT_EXP\${ac_uB}HAVE_AIX_SMT_EXP\${ac_uC}1\${ac_uD}
  2910. \${ac_eA}HAVE_AIX_SMT_EXP\${ac_eB}HAVE_AIX_SMT_EXP\${ac_eC}1\${ac_eD}
  2911. "
  2912. }
  2913.  
  2914.   
  2915. fi
  2916.  
  2917. #### Specify what sort of things we'll be editing into Makefile and config.h.
  2918. ### Use configuration here uncanonicalized to avoid exceeding size limits.
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949. {
  2950. test -n "$verbose" && \
  2951. echo "    defining" EMACS_CONFIGURATION to be ""\"${configuration}\"""
  2952. echo "#define" EMACS_CONFIGURATION ""\"${configuration}\""" >> confdefs.h
  2953. DEFS="$DEFS -DEMACS_CONFIGURATION="\"${configuration}\"""
  2954. ac_sed_defs="${ac_sed_defs}\${ac_dA}EMACS_CONFIGURATION\${ac_dB}EMACS_CONFIGURATION\${ac_dC}"\"${configuration}\""\${ac_dD}
  2955. \${ac_uA}EMACS_CONFIGURATION\${ac_uB}EMACS_CONFIGURATION\${ac_uC}"\"${configuration}\""\${ac_uD}
  2956. \${ac_eA}EMACS_CONFIGURATION\${ac_eB}EMACS_CONFIGURATION\${ac_eC}"\"${configuration}\""\${ac_eD}
  2957. "
  2958. }
  2959.  
  2960.  
  2961. {
  2962. test -n "$verbose" && \
  2963. echo "    defining" config_machfile to be ""\"${machfile}\"""
  2964. echo "#define" config_machfile ""\"${machfile}\""" >> confdefs.h
  2965. DEFS="$DEFS -Dconfig_machfile="\"${machfile}\"""
  2966. ac_sed_defs="${ac_sed_defs}\${ac_dA}config_machfile\${ac_dB}config_machfile\${ac_dC}"\"${machfile}\""\${ac_dD}
  2967. \${ac_uA}config_machfile\${ac_uB}config_machfile\${ac_uC}"\"${machfile}\""\${ac_uD}
  2968. \${ac_eA}config_machfile\${ac_eB}config_machfile\${ac_eC}"\"${machfile}\""\${ac_eD}
  2969. "
  2970. }
  2971.  
  2972.  
  2973. {
  2974. test -n "$verbose" && \
  2975. echo "    defining" config_opsysfile to be ""\"${opsysfile}\"""
  2976. echo "#define" config_opsysfile ""\"${opsysfile}\""" >> confdefs.h
  2977. DEFS="$DEFS -Dconfig_opsysfile="\"${opsysfile}\"""
  2978. ac_sed_defs="${ac_sed_defs}\${ac_dA}config_opsysfile\${ac_dB}config_opsysfile\${ac_dC}"\"${opsysfile}\""\${ac_dD}
  2979. \${ac_uA}config_opsysfile\${ac_uB}config_opsysfile\${ac_uC}"\"${opsysfile}\""\${ac_uD}
  2980. \${ac_eA}config_opsysfile\${ac_eB}config_opsysfile\${ac_eC}"\"${opsysfile}\""\${ac_eD}
  2981. "
  2982. }
  2983.  
  2984.  
  2985. {
  2986. test -n "$verbose" && \
  2987. echo "    defining" LD_SWITCH_X_SITE to be "${LD_SWITCH_X_SITE}"
  2988. echo "#define" LD_SWITCH_X_SITE "${LD_SWITCH_X_SITE}" >> confdefs.h
  2989. DEFS="$DEFS -DLD_SWITCH_X_SITE=${LD_SWITCH_X_SITE}"
  2990. ac_sed_defs="${ac_sed_defs}\${ac_dA}LD_SWITCH_X_SITE\${ac_dB}LD_SWITCH_X_SITE\${ac_dC}${LD_SWITCH_X_SITE}\${ac_dD}
  2991. \${ac_uA}LD_SWITCH_X_SITE\${ac_uB}LD_SWITCH_X_SITE\${ac_uC}${LD_SWITCH_X_SITE}\${ac_uD}
  2992. \${ac_eA}LD_SWITCH_X_SITE\${ac_eB}LD_SWITCH_X_SITE\${ac_eC}${LD_SWITCH_X_SITE}\${ac_eD}
  2993. "
  2994. }
  2995.  
  2996.  
  2997. {
  2998. test -n "$verbose" && \
  2999. echo "    defining" LD_SWITCH_X_SITE_AUX to be "${LD_SWITCH_X_SITE_AUX}"
  3000. echo "#define" LD_SWITCH_X_SITE_AUX "${LD_SWITCH_X_SITE_AUX}" >> confdefs.h
  3001. DEFS="$DEFS -DLD_SWITCH_X_SITE_AUX=${LD_SWITCH_X_SITE_AUX}"
  3002. ac_sed_defs="${ac_sed_defs}\${ac_dA}LD_SWITCH_X_SITE_AUX\${ac_dB}LD_SWITCH_X_SITE_AUX\${ac_dC}${LD_SWITCH_X_SITE_AUX}\${ac_dD}
  3003. \${ac_uA}LD_SWITCH_X_SITE_AUX\${ac_uB}LD_SWITCH_X_SITE_AUX\${ac_uC}${LD_SWITCH_X_SITE_AUX}\${ac_uD}
  3004. \${ac_eA}LD_SWITCH_X_SITE_AUX\${ac_eB}LD_SWITCH_X_SITE_AUX\${ac_eC}${LD_SWITCH_X_SITE_AUX}\${ac_eD}
  3005. "
  3006. }
  3007.  
  3008.  
  3009. {
  3010. test -n "$verbose" && \
  3011. echo "    defining" C_SWITCH_X_SITE to be "${C_SWITCH_X_SITE}"
  3012. echo "#define" C_SWITCH_X_SITE "${C_SWITCH_X_SITE}" >> confdefs.h
  3013. DEFS="$DEFS -DC_SWITCH_X_SITE=${C_SWITCH_X_SITE}"
  3014. ac_sed_defs="${ac_sed_defs}\${ac_dA}C_SWITCH_X_SITE\${ac_dB}C_SWITCH_X_SITE\${ac_dC}${C_SWITCH_X_SITE}\${ac_dD}
  3015. \${ac_uA}C_SWITCH_X_SITE\${ac_uB}C_SWITCH_X_SITE\${ac_uC}${C_SWITCH_X_SITE}\${ac_uD}
  3016. \${ac_eA}C_SWITCH_X_SITE\${ac_eB}C_SWITCH_X_SITE\${ac_eC}${C_SWITCH_X_SITE}\${ac_eD}
  3017. "
  3018. }
  3019.  
  3020.  
  3021. {
  3022. test -n "$verbose" && \
  3023. echo "    defining" UNEXEC_SRC to be "${UNEXEC_SRC}"
  3024. echo "#define" UNEXEC_SRC "${UNEXEC_SRC}" >> confdefs.h
  3025. DEFS="$DEFS -DUNEXEC_SRC=${UNEXEC_SRC}"
  3026. ac_sed_defs="${ac_sed_defs}\${ac_dA}UNEXEC_SRC\${ac_dB}UNEXEC_SRC\${ac_dC}${UNEXEC_SRC}\${ac_dD}
  3027. \${ac_uA}UNEXEC_SRC\${ac_uB}UNEXEC_SRC\${ac_uC}${UNEXEC_SRC}\${ac_uD}
  3028. \${ac_eA}UNEXEC_SRC\${ac_eB}UNEXEC_SRC\${ac_eC}${UNEXEC_SRC}\${ac_eD}
  3029. "
  3030. }
  3031.  
  3032.  
  3033.  
  3034. if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
  3035.    
  3036. {
  3037. test -n "$verbose" && \
  3038. echo "    defining HAVE_X_WINDOWS"
  3039. echo "#define" HAVE_X_WINDOWS "1" >> confdefs.h
  3040. DEFS="$DEFS -DHAVE_X_WINDOWS=1"
  3041. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_X_WINDOWS\${ac_dB}HAVE_X_WINDOWS\${ac_dC}1\${ac_dD}
  3042. \${ac_uA}HAVE_X_WINDOWS\${ac_uB}HAVE_X_WINDOWS\${ac_uC}1\${ac_uD}
  3043. \${ac_eA}HAVE_X_WINDOWS\${ac_eB}HAVE_X_WINDOWS\${ac_eC}1\${ac_eD}
  3044. "
  3045. }
  3046.  
  3047. fi
  3048. if [ "${USE_X_TOOLKIT}" != "none" ] ; then
  3049.    
  3050. {
  3051. test -n "$verbose" && \
  3052. echo "    defining USE_X_TOOLKIT"
  3053. echo "#define" USE_X_TOOLKIT "1" >> confdefs.h
  3054. DEFS="$DEFS -DUSE_X_TOOLKIT=1"
  3055. ac_sed_defs="${ac_sed_defs}\${ac_dA}USE_X_TOOLKIT\${ac_dB}USE_X_TOOLKIT\${ac_dC}1\${ac_dD}
  3056. \${ac_uA}USE_X_TOOLKIT\${ac_uB}USE_X_TOOLKIT\${ac_uC}1\${ac_uD}
  3057. \${ac_eA}USE_X_TOOLKIT\${ac_eB}USE_X_TOOLKIT\${ac_eC}1\${ac_eD}
  3058. "
  3059. }
  3060.  
  3061. fi
  3062. if [ "${HAVE_X11}" = "yes" ] ; then
  3063.    
  3064. {
  3065. test -n "$verbose" && \
  3066. echo "    defining HAVE_X11"
  3067. echo "#define" HAVE_X11 "1" >> confdefs.h
  3068. DEFS="$DEFS -DHAVE_X11=1"
  3069. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_X11\${ac_dB}HAVE_X11\${ac_dC}1\${ac_dD}
  3070. \${ac_uA}HAVE_X11\${ac_uB}HAVE_X11\${ac_uC}1\${ac_uD}
  3071. \${ac_eA}HAVE_X11\${ac_eB}HAVE_X11\${ac_eC}1\${ac_eD}
  3072. "
  3073. }
  3074.  
  3075. fi
  3076. if [ "${HAVE_XFREE386}" = "yes" ] ; then
  3077.    
  3078. {
  3079. test -n "$verbose" && \
  3080. echo "    defining HAVE_XFREE386"
  3081. echo "#define" HAVE_XFREE386 "1" >> confdefs.h
  3082. DEFS="$DEFS -DHAVE_XFREE386=1"
  3083. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_XFREE386\${ac_dB}HAVE_XFREE386\${ac_dC}1\${ac_dD}
  3084. \${ac_uA}HAVE_XFREE386\${ac_uB}HAVE_XFREE386\${ac_uC}1\${ac_uD}
  3085. \${ac_eA}HAVE_XFREE386\${ac_eB}HAVE_XFREE386\${ac_eC}1\${ac_eD}
  3086. "
  3087. }
  3088.  
  3089. fi
  3090. if [ "${HAVE_X_MENU}" = "yes" ] ; then
  3091.    
  3092. {
  3093. test -n "$verbose" && \
  3094. echo "    defining HAVE_X_MENU"
  3095. echo "#define" HAVE_X_MENU "1" >> confdefs.h
  3096. DEFS="$DEFS -DHAVE_X_MENU=1"
  3097. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_X_MENU\${ac_dB}HAVE_X_MENU\${ac_dC}1\${ac_dD}
  3098. \${ac_uA}HAVE_X_MENU\${ac_uB}HAVE_X_MENU\${ac_uC}1\${ac_uD}
  3099. \${ac_eA}HAVE_X_MENU\${ac_eB}HAVE_X_MENU\${ac_eC}1\${ac_eD}
  3100. "
  3101. }
  3102.  
  3103. fi
  3104. if [ "${GNU_MALLOC}" = "yes" ] ; then
  3105.    
  3106. {
  3107. test -n "$verbose" && \
  3108. echo "    defining GNU_MALLOC"
  3109. echo "#define" GNU_MALLOC "1" >> confdefs.h
  3110. DEFS="$DEFS -DGNU_MALLOC=1"
  3111. ac_sed_defs="${ac_sed_defs}\${ac_dA}GNU_MALLOC\${ac_dB}GNU_MALLOC\${ac_dC}1\${ac_dD}
  3112. \${ac_uA}GNU_MALLOC\${ac_uB}GNU_MALLOC\${ac_uC}1\${ac_uD}
  3113. \${ac_eA}GNU_MALLOC\${ac_eB}GNU_MALLOC\${ac_eC}1\${ac_eD}
  3114. "
  3115. }
  3116.  
  3117. fi
  3118. if [ "${REL_ALLOC}" = "yes" ] ; then
  3119.    
  3120. {
  3121. test -n "$verbose" && \
  3122. echo "    defining REL_ALLOC"
  3123. echo "#define" REL_ALLOC "1" >> confdefs.h
  3124. DEFS="$DEFS -DREL_ALLOC=1"
  3125. ac_sed_defs="${ac_sed_defs}\${ac_dA}REL_ALLOC\${ac_dB}REL_ALLOC\${ac_dC}1\${ac_dD}
  3126. \${ac_uA}REL_ALLOC\${ac_uB}REL_ALLOC\${ac_uC}1\${ac_uD}
  3127. \${ac_eA}REL_ALLOC\${ac_eB}REL_ALLOC\${ac_eC}1\${ac_eD}
  3128. "
  3129. }
  3130.  
  3131. fi
  3132. if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
  3133.    
  3134. {
  3135. test -n "$verbose" && \
  3136. echo "    defining LISP_FLOAT_TYPE"
  3137. echo "#define" LISP_FLOAT_TYPE "1" >> confdefs.h
  3138. DEFS="$DEFS -DLISP_FLOAT_TYPE=1"
  3139. ac_sed_defs="${ac_sed_defs}\${ac_dA}LISP_FLOAT_TYPE\${ac_dB}LISP_FLOAT_TYPE\${ac_dC}1\${ac_dD}
  3140. \${ac_uA}LISP_FLOAT_TYPE\${ac_uB}LISP_FLOAT_TYPE\${ac_uC}1\${ac_uD}
  3141. \${ac_eA}LISP_FLOAT_TYPE\${ac_eB}LISP_FLOAT_TYPE\${ac_eC}1\${ac_eD}
  3142. "
  3143. }
  3144.  
  3145. fi
  3146.  
  3147. # ====================== Developer's configuration =======================
  3148.  
  3149. # The following assignments make sense if you're running Emacs on a single
  3150. # machine, one version at a time, and  you want changes to the lisp and etc
  3151. # directories in the source tree to show up immediately in your working
  3152. # environment.  It saves a great deal of disk space by not duplicating the
  3153. # lisp and etc directories.
  3154.  
  3155. if [ "$run_in_place" = "1" ]; then
  3156.    lispdir='${srcdir}/lisp'
  3157.    locallisppath='${srcdir}/site-lisp'
  3158.    etcdir='${srcdir}/etc'
  3159.    lockdir='${srcdir}/lock'
  3160.    # We used to make archlibdir and docdir absolute,
  3161.    # but that caused trouble with automounters.
  3162.    archlibdir='${srcdir}/lib-src'
  3163.    docdir='${srcdir}/etc'
  3164.    infodir='${srcdir}/info'
  3165. elif [ "$single_tree" = "1" ]; then
  3166.    if [ "$exec_prefix_specified" = "" ]; then
  3167.       exec_prefix='${prefix}'
  3168.    fi
  3169.    if [ "$bindir_specified" = "" ]; then
  3170.       bindir='${exec_prefix}/bin/${configuration}'
  3171.    fi
  3172.    if [ "$datadir_specified" = "" ]; then
  3173.       datadir='${prefix}/common'
  3174.    fi
  3175.    if [ "$statedir_specified" = "" ]; then
  3176.       statedir='${prefix}/common'
  3177.    fi
  3178.    if [ "$libdir_specified" = "" ]; then
  3179.       libdir='${bindir}'
  3180.    fi
  3181.    if [ "$lispdir_specified" = "" ]; then
  3182.       lispdir='${prefix}/common/lisp'
  3183.    fi
  3184.    if [ "$locallisppath_specified" = "" ]; then
  3185.       locallisppath='${prefix}/common/site-lisp'
  3186.    fi
  3187.    if [ "$lockdir_specified" = "" ]; then
  3188.       lockdir='${prefix}/common/lock'
  3189.    fi
  3190.    if [ "$archlibdir_specified" = "" ]; then
  3191.       archlibdir='${libdir}/etc'
  3192.    fi
  3193.    if [ "$etcdir_specified" = "" ]; then
  3194.       etcdir='${prefix}/common/data'
  3195.    fi
  3196.    if [ "$docdir_specified" = "" ]; then
  3197.       docdir='${prefix}/common/data'
  3198.    fi
  3199. fi
  3200.  
  3201. #### Report on what we decided to do.
  3202. echo "
  3203.  
  3204. Configured for \`${canonical}'.
  3205.  
  3206.   Where should the build process find the source code?    ${srcdir}
  3207.   What operating system and machine description files should Emacs use?
  3208.         \`${opsysfile}' and \`${machfile}'
  3209.   What compiler should emacs be built with?               ${CC} ${CFLAGS}
  3210.   Should Emacs use the GNU version of malloc?             ${GNU_MALLOC}${GNU_MALLOC_reason}
  3211.   Should Emacs use the relocating allocator for buffers?  ${REL_ALLOC}
  3212.   What window system should Emacs use?                    ${window_system}
  3213.   What toolkit should Emacs use?                          ${USE_X_TOOLKIT}${x_includes+
  3214.   Where do we find X Windows header files?                }${x_includes}${x_libraries+
  3215.   Where do we find X Windows libraries?                   }${x_libraries}
  3216.  
  3217. "
  3218.  
  3219. # Remove any trailing slashes in these variables.
  3220. test -n "${prefix}" &&
  3221.   prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
  3222. test -n "${exec_prefix}" &&
  3223.   exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
  3224.  
  3225.  
  3226. # The preferred way to propogate these variables is regular @ substitutions.
  3227. if test -n "$prefix"; then
  3228.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  3229. else
  3230.   prefix=/usr/local
  3231. fi
  3232. if test -n "$exec_prefix"; then
  3233.   ac_prsub="$ac_prsub
  3234. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  3235. else
  3236.   exec_prefix='${prefix}' # Let make expand it.
  3237. fi
  3238.  
  3239. # Any assignment to VPATH causes Sun make to only execute
  3240. # the first set of double-colon rules, so remove it if not needed.
  3241. # If there is a colon in the path, we need to keep it.
  3242. if test "x$srcdir" = x.; then
  3243.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3244. fi
  3245.  
  3246. # Quote sed substitution magic chars in DEFS.
  3247. cat >conftest.def <<EOF
  3248. $DEFS
  3249. EOF
  3250. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  3251. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  3252. rm -f conftest.def
  3253. # Substitute for predefined variables.
  3254.  
  3255. trap 'rm -f config.status; exit 1' 1 2 15
  3256. echo creating config.status
  3257. rm -f config.status
  3258. cat > config.status <<EOF
  3259. #!/bin/sh
  3260. # Generated automatically by configure.
  3261. # Run this file to recreate the current configuration.
  3262. # This directory was configured as follows,
  3263. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3264. #
  3265. # $0 $configure_args
  3266.  
  3267. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  3268. for ac_option
  3269. do
  3270.   case "\$ac_option" in
  3271.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3272.     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  3273.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  3274.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3275.     echo "config.status generated by autoconf version 1.11"
  3276.     exit 0 ;;
  3277.   -help | --help | --hel | --he | --h)
  3278.     echo "\$ac_cs_usage"; exit 0 ;;
  3279.   *) echo "\$ac_cs_usage"; exit 1 ;;
  3280.   esac
  3281. done
  3282.  
  3283. trap 'rm -fr Makefile lib-src/Makefile.in oldXMenu/Makefile lwlib/Makefile src/Makefile.in src/config.h conftest*; exit 1' 1 2 15
  3284. CC='$CC'
  3285. LN_S='$LN_S'
  3286. CPP='$CPP'
  3287. INSTALL='$INSTALL'
  3288. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  3289. INSTALL_DATA='$INSTALL_DATA'
  3290. YACC='$YACC'
  3291. SET_MAKE='$SET_MAKE'
  3292. ALLOCA='$ALLOCA'
  3293. version='$version'
  3294. configuration='$configuration'
  3295. srcdir='$srcdir'
  3296. prefix='$prefix'
  3297. exec_prefix='$exec_prefix'
  3298. bindir='$bindir'
  3299. datadir='$datadir'
  3300. statedir='$statedir'
  3301. libdir='$libdir'
  3302. mandir='$mandir'
  3303. infodir='$infodir'
  3304. lispdir='$lispdir'
  3305. locallisppath='$locallisppath'
  3306. lisppath='$lisppath'
  3307. etcdir='$etcdir'
  3308. lockdir='$lockdir'
  3309. archlibdir='$archlibdir'
  3310. docdir='$docdir'
  3311. c_switch_system='$c_switch_system'
  3312. c_switch_machine='$c_switch_machine'
  3313. LD_SWITCH_X_SITE='$LD_SWITCH_X_SITE'
  3314. LD_SWITCH_X_SITE_AUX='$LD_SWITCH_X_SITE_AUX'
  3315. C_SWITCH_X_SITE='$C_SWITCH_X_SITE'
  3316. CFLAGS='$CFLAGS'
  3317. X_TOOLKIT_TYPE='$X_TOOLKIT_TYPE'
  3318. machfile='$machfile'
  3319. opsysfile='$opsysfile'
  3320. LIBS='$LIBS'
  3321. top_srcdir='$top_srcdir'
  3322. ac_prsub='$ac_prsub'
  3323. ac_vpsub='$ac_vpsub'
  3324. extrasub='$extrasub'
  3325. EOF
  3326. cat >> config.status <<\EOF
  3327.  
  3328. ac_given_srcdir=$srcdir
  3329.  
  3330. CONFIG_FILES=${CONFIG_FILES-"Makefile lib-src/Makefile.in oldXMenu/Makefile lwlib/Makefile src/Makefile.in"}
  3331. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  3332.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3333.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3334.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3335.     # The file is in a subdirectory.
  3336.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3337.     ac_dir_suffix="/$ac_dir"
  3338.   else
  3339.     ac_dir_suffix=
  3340.   fi
  3341.  
  3342.   # A "../" for each directory in $ac_dir_suffix.
  3343.   ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3344.   case "$ac_given_srcdir" in
  3345.   .)  srcdir=.
  3346.       if test -z "$ac_dir_suffix"; then top_srcdir=.
  3347.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3348.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3349.   *) # Relative path.
  3350.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3351.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3352.   esac
  3353.  
  3354.   echo creating "$ac_file"
  3355.   rm -f "$ac_file"
  3356.   comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  3357.   case "$ac_file" in
  3358.     *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
  3359.     * )          echo "# $comment_str"     > "$ac_file" ;;
  3360.   esac
  3361.   sed -e "
  3362. $ac_prsub
  3363. $ac_vpsub
  3364. $extrasub
  3365. s%@CC@%$CC%g
  3366. s%@LN_S@%$LN_S%g
  3367. s%@CPP@%$CPP%g
  3368. s%@INSTALL@%$INSTALL%g
  3369. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  3370. s%@INSTALL_DATA@%$INSTALL_DATA%g
  3371. s%@YACC@%$YACC%g
  3372. s%@SET_MAKE@%$SET_MAKE%g
  3373. s%@ALLOCA@%$ALLOCA%g
  3374. s%@version@%$version%g
  3375. s%@configuration@%$configuration%g
  3376. s%@srcdir@%$srcdir%g
  3377. s%@prefix@%$prefix%g
  3378. s%@exec_prefix@%$exec_prefix%g
  3379. s%@bindir@%$bindir%g
  3380. s%@datadir@%$datadir%g
  3381. s%@statedir@%$statedir%g
  3382. s%@libdir@%$libdir%g
  3383. s%@mandir@%$mandir%g
  3384. s%@infodir@%$infodir%g
  3385. s%@lispdir@%$lispdir%g
  3386. s%@locallisppath@%$locallisppath%g
  3387. s%@lisppath@%$lisppath%g
  3388. s%@etcdir@%$etcdir%g
  3389. s%@lockdir@%$lockdir%g
  3390. s%@archlibdir@%$archlibdir%g
  3391. s%@docdir@%$docdir%g
  3392. s%@c_switch_system@%$c_switch_system%g
  3393. s%@c_switch_machine@%$c_switch_machine%g
  3394. s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
  3395. s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
  3396. s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
  3397. s%@CFLAGS@%$CFLAGS%g
  3398. s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
  3399. s%@machfile@%$machfile%g
  3400. s%@opsysfile@%$opsysfile%g
  3401. s%@LIBS@%$LIBS%g
  3402. s%@top_srcdir@%$top_srcdir%g
  3403. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  3404. fi; done
  3405.  
  3406. # These sed commands are put into ac_sed_defs when defining a macro.
  3407. # They are broken into pieces to make the sed script easier to manage.
  3408. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  3409. # is the cpp macro being defined and VALUE is the value it is being given.
  3410. # Each defining turns into a single global substitution command.
  3411. # Hopefully no one uses "!" as a variable value.
  3412. # Other candidates for the sed separators, like , and @, do get used.
  3413. #
  3414. # ac_d sets the value in "#define NAME VALUE" lines.
  3415. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3416. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  3417. ac_dC='\3'
  3418. ac_dD='!g'
  3419. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3420. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3421. ac_uB='\([     ]\)!\1#\2define\3'
  3422. ac_uC=' '
  3423. ac_uD='\4!g'
  3424. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3425. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3426. ac_eB='$!\1#\2define\3'
  3427. ac_eC=' '
  3428. ac_eD='!g'
  3429. rm -f conftest.sed
  3430. EOF
  3431. # Turn off quoting long enough to insert the sed commands.
  3432. rm -f conftest.sh
  3433. cat > conftest.sh <<EOF
  3434. $ac_sed_defs
  3435. EOF
  3436.  
  3437. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  3438. # on the size of here documents.
  3439.  
  3440. # Maximum number of lines to put in a single here document.
  3441. ac_max_sh_lines=9
  3442.  
  3443. while :
  3444. do
  3445.   # wc gives bogus results for an empty file on some AIX systems.
  3446.   ac_lines=`grep -c . conftest.sh`
  3447.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3448.   rm -f conftest.s1 conftest.s2
  3449.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
  3450.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
  3451.   # Write a limited-size here document to append to conftest.sed.
  3452.   echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  3453.   cat conftest.s1 >> config.status
  3454.   echo 'CONFEOF' >> config.status
  3455.   rm -f conftest.s1 conftest.sh
  3456.   mv conftest.s2 conftest.sh
  3457. done
  3458. rm -f conftest.sh
  3459.  
  3460. # Now back to your regularly scheduled config.status.
  3461. cat >> config.status <<\EOF
  3462. # This sed command replaces #undef's with comments.  This is necessary, for
  3463. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3464. # on some systems where configure will not decide to define it in
  3465. # src/config.h.
  3466. cat >> conftest.sed <<\CONFEOF
  3467. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  3468. CONFEOF
  3469. rm -f conftest.h
  3470. # Break up the sed commands because old seds have small limits.
  3471. ac_max_sed_lines=20
  3472.  
  3473. CONFIG_HEADERS=${CONFIG_HEADERS-"src/config.h"}
  3474. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  3475.   echo creating $ac_file
  3476.  
  3477.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  3478.   cp conftest.sed conftest.stm
  3479.   while :
  3480.   do
  3481.     ac_lines=`grep -c . conftest.stm`
  3482.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3483.     rm -f conftest.s1 conftest.s2 conftest.h2
  3484.     sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
  3485.     sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
  3486.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  3487.     rm -f conftest.s1 conftest.h1 conftest.stm
  3488.     mv conftest.h2 conftest.h1
  3489.     mv conftest.s2 conftest.stm
  3490.   done
  3491.   rm -f conftest.stm conftest.h
  3492.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3493.   cat conftest.h1 >> conftest.h
  3494.   rm -f conftest.h1
  3495.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3496.     # The file exists and we would not be changing it.
  3497.     echo "$ac_file is unchanged"
  3498.     rm -f conftest.h
  3499.   else
  3500.     rm -f $ac_file
  3501.     mv conftest.h $ac_file
  3502.   fi
  3503. fi; done
  3504. rm -f conftest.sed
  3505.  
  3506.  
  3507.  
  3508.  
  3509. # Build src/Makefile from ${srcdir}/src/Makefile.in.  This must be done
  3510. # after src/config.h is built, since we rely on that file.
  3511.  
  3512. # Now get this: Some word that is part of the ${srcdir} directory name
  3513. # or the ${configuration} value might, just might, happen to be an
  3514. # identifier like `sun4' or `i386' or something, and be predefined by
  3515. # the C preprocessor to some helpful value like 1, or maybe the empty
  3516. # string.  Needless to say consequent macro substitutions are less
  3517. # than conducive to the makefile finding the correct directory.
  3518. undefs="`echo $top_srcdir $configuration $canonical |
  3519. sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
  3520.     -e 's/  */ -U/g' -e 's/-U[0-9][^ ]*//g' \
  3521. `"
  3522.  
  3523. echo creating lib-src/Makefile
  3524. ( cd lib-src
  3525.   rm -f junk.c junk1.c junk2.c
  3526.   sed -e '/start of cpp stuff/q' \
  3527.       < Makefile.in > junk1.c
  3528.   sed -e '1,/start of cpp stuff/d'\
  3529.       -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
  3530.       < Makefile.in > junk.c
  3531.   $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
  3532.       sed -e 's/^ /    /' -e '/^#/d' -e '/^[      ]*$/d' > junk2.c
  3533.   cat junk1.c junk2.c > Makefile.new
  3534.   rm -f junk.c junk1.c junk2.c
  3535.   chmod 444 Makefile.new
  3536.   mv -f Makefile.new Makefile
  3537. )
  3538.  
  3539. echo creating src/Makefile
  3540. ( cd src
  3541.   rm -f junk.c junk1.c junk2.c
  3542.   sed -e '/start of cpp stuff/q' \
  3543.       < Makefile.in > junk1.c
  3544.   sed -e '1,/start of cpp stuff/d'\
  3545.       -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
  3546.       < Makefile.in > junk.c
  3547.   $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
  3548.       sed -e 's/^ /    /' -e '/^#/d' -e '/^[      ]*$/d' > junk2.c
  3549.   cat junk1.c junk2.c > Makefile.new
  3550.   rm -f junk.c junk1.c junk2.c
  3551.   chmod 444 Makefile.new
  3552.   mv -f Makefile.new Makefile
  3553. )
  3554. exit 0
  3555. EOF
  3556. chmod +x config.status
  3557. # Some shells look in PATH for config.status without the "./".
  3558. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
  3559.  
  3560.